/* Make post — page template (matches theme: #0F172A, #7C3AED, glass cards) */
.make-post-page {
    overflow-x: clip;
    --mp-header-offset: 96px;
    padding-top: var(--mp-header-offset);
    position: relative;
    isolation: isolate;
}

/* Ambient gradient blob — full viewport, stays behind content while scrolling */
.make-post-page::before {
    content: "";
    position: fixed;
    inset: -15% -8%;
    width: auto;
    height: 130vh;
    min-height: 100%;
    background:
        radial-gradient(ellipse 85% 55% at 35% 18%, rgba(124, 58, 237, 0.42), transparent 58%),
        radial-gradient(ellipse 70% 50% at 72% 35%, rgba(99, 102, 241, 0.22), transparent 55%),
        radial-gradient(ellipse 90% 45% at 50% 95%, rgba(124, 58, 237, 0.14), transparent 60%);
    filter: blur(44px);
    opacity: 0.88;
    animation: make-post-page-blob 14s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.make-post-hero,
.make-post-section {
    position: relative;
    z-index: 1;
}

@keyframes make-post-page-blob {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.78;
    }
    100% {
        transform: translate(18px, -24px) scale(1.05);
        opacity: 0.95;
    }
}

@media (prefers-reduced-motion: reduce) {
    .make-post-page::before {
        animation: none;
    }
}

.make-post-hero {
    position: relative;
    padding: 72px 0 40px;
    text-align: center;
    background: transparent;
}

.make-post-page .make-post-hero .h1 {
    font-size: clamp(40px, 8vw, 84px);
    margin-bottom: 16px;
}

.make-post-lead {
    max-width: 720px;
    margin: 0 auto;
    font-weight: 500;
    font-size: clamp(18px, 2.5vw, 24px);
    line-height: 1.35;
    color: #a1a2b1;
}

.make-post-marquee-wrap {
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    left: 0;
}

/* Sentinel for IntersectionObserver — detects when sticky nav pins (see make-post.js) */
.make-post-nav-sentinel {
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
}

/* Sticky bar: chrome only while pinned (.is-stuck), see .make-post-nav-sentinel + JS */
.make-post-nav {
    position: sticky;
    top: 72px;
    z-index: 50;
    padding: 12px 0 22px;
    margin: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.make-post-nav.is-stuck {
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.97) 0%,
        rgba(15, 23, 42, 0.93) 50%,
        rgba(15, 23, 42, 0.88) 100%
    );
    backdrop-filter: blur(12px) saturate(1.08);
    -webkit-backdrop-filter: blur(12px) saturate(1.08);
    border-bottom-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.38);
}

.make-post-nav-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
}

/* One row + horizontal scroll; top aligned with theme header offset */
@media (max-width: 767px) {
    .make-post-nav {
        top: var(--mp-header-offset);
        padding: 10px 0 14px;
    }

    .make-post-nav.is-stuck {
        backdrop-filter: blur(14px) saturate(1.1);
        -webkit-backdrop-filter: blur(14px) saturate(1.1);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
    }

    .make-post-nav .container {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .make-post-nav-inner {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding: 4px 16px 4px;
        scrollbar-width: thin;
    }

    .make-post-nav-inner::-webkit-scrollbar {
        height: 4px;
    }

    .make-post-nav-inner::-webkit-scrollbar-thumb {
        background: rgba(124, 58, 237, 0.45);
        border-radius: 4px;
    }

    .make-post-section {
        scroll-margin-top: calc(var(--mp-header-offset) + 64px);
    }
}

.make-post-nav a {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 15px;
    line-height: 1.2;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.make-post-nav a:hover,
.make-post-nav a:focus-visible {
    border-color: rgba(124, 58, 237, 0.55);
    background: rgba(124, 58, 237, 0.2);
    color: #fff;
    outline: none;
}

@media (max-width: 767px) {
    .make-post-nav a {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 8px 14px;
        font-size: 14px;
        background: rgba(255, 255, 255, 0.09);
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .make-post-nav a:hover,
    .make-post-nav a:focus-visible {
        background: rgba(124, 58, 237, 0.28);
        border-color: rgba(167, 139, 250, 0.55);
    }
}

.make-post-section {
    padding: 56px 0 72px;
    scroll-margin-top: 120px;
    background: transparent;
}

.make-post-section-head {
    margin-bottom: 32px;
    text-align: center;
}

.make-post-section-head .h2 {
    font-size: clamp(28px, 5vw, 48px);
    margin-bottom: 8px;
}

.make-post-section-head .body-m {
    max-width: 640px;
    margin: 0 auto;
}

/* Card layout: grid on tablet/desktop; Swiper (JS) only ≤767px */
.make-post-grid.make-post-swiper {
    width: 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .make-post-grid.make-post-swiper.swiper {
        display: grid !important;
        gap: 16px;
        margin: 0 !important;
        overflow: visible !important;
    }

    .make-post-grid.make-post-swiper .swiper-wrapper {
        display: contents !important;
    }

    .make-post-grid.make-post-swiper .swiper-slide {
        display: block !important;
        width: auto !important;
        height: auto;
        margin: 0 !important;
    }

    .make-post-swiper-pagination {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .make-post-grid.make-post-swiper.swiper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .make-post-grid.make-post-swiper.swiper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.make-post-slide {
    height: auto;
    display: flex;
    box-sizing: border-box;
}

.make-post-slide .make-post-card {
    width: 100%;
    flex: 1;
}

/* Mobile slider: room for dots */
@media (max-width: 767px) {
    .make-post-grid.make-post-swiper {
        padding-bottom: 8px;
        overflow: hidden;
    }

    .make-post-swiper-pagination {
        position: relative;
        margin-top: 12px;
    }

    .make-post-swiper-pagination .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        background: rgba(255, 255, 255, 0.35);
        opacity: 1;
    }

    .make-post-swiper-pagination .swiper-pagination-bullet-active {
        background: #7c3aed;
    }
}

.make-post-card {
    perspective: 1400px;
    min-height: 0;
    max-width: 100%;
}

.make-post-card-inner {
    position: relative;
    width: 100%;
    min-height: 360px;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .make-post-card:hover .make-post-card-inner,
    .make-post-card:focus-within .make-post-card-inner {
        transform: rotateY(180deg);
    }
}

.make-post-card.is-flipped .make-post-card-inner {
    transform: rotateY(180deg);
}

.make-post-card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

.make-post-card-front {
    justify-content: space-between;
    gap: 16px;
}

.make-post-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
    border-color: rgba(124, 58, 237, 0.35);
}

.make-post-prompt-label {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.35);
}

.make-post-prompt-text {
    font-size: 18px;
    line-height: 1.45;
    color: #fff;
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.make-post-hint {
    font-size: 14px;
    color: #94a3b8;
    margin-top: auto;
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .make-post-hint {
        display: block;
    }
}

.make-post-result {
    flex: 1;
    overflow: auto;
    min-height: 0;
    padding-right: 4px;
    font-size: 16px;
    line-height: 1.55;
    color: #cbd5e1;
    white-space: pre-wrap;
    word-break: break-word;
}

.make-post-result::-webkit-scrollbar {
    width: 6px;
}

.make-post-result::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.45);
    border-radius: 6px;
}

.make-post-flip-btn,
.make-post-flip-back {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #7c3aed;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.make-post-flip-back {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.make-post-flip-btn:hover,
.make-post-flip-back:hover {
    background: #6d28d9;
}

.make-post-flip-back:hover {
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1023px) {
    .make-post-flip-btn,
    .make-post-flip-back {
        display: inline-flex;
    }

    .make-post-hint {
        display: none;
    }
}

@media (max-width: 560px) {
    .make-post-page {
        --mp-header-offset: 80px;
        padding-top: var(--mp-header-offset);
    }

    .make-post-card-inner {
        min-height: 340px;
    }
}

.make-post-card[data-aos] {
    pointer-events: auto;
}
