:root {
    --home-rebuild-bg: #0d0e11;
    --home-rebuild-surface: #171a1f;
    --home-rebuild-surface-low: #121317;
    --home-rebuild-surface-high: #22262e;
    --home-rebuild-primary: #d5c0d4;
    --home-rebuild-tertiary: #fff8f8;
    --home-rebuild-text: #e3e5f0;
    --home-rebuild-muted: #9b9ea5;
    --home-rebuild-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    --home-rebuild-gradient: linear-gradient(135deg, #514252 0%, #d5c0d4 100%);
    --home-rebuild-on-primary: #4a3b4c;
    --home-rebuild-body: "Manrope", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --home-rebuild-display: "Newsreader", "Noto Serif SC", "Songti SC", serif;
}

.home-rebuild-page {
    min-height: 100vh;
    margin: 0;
    padding-bottom: 3rem;
    background-color: var(--home-rebuild-bg);
    color: var(--home-rebuild-text);
    font-family: var(--home-rebuild-body);
}

.home-rebuild-page.home-rebuild-lock {
    overflow: hidden;
}

.home-rebuild-page a {
    color: inherit;
    text-decoration: none;
}

.home-rebuild-page button,
.home-rebuild-page input {
    font: inherit;
}

.home-rebuild-shell,
.home-rebuild-main {
    width: min(1280px, calc(100% - 3rem));
    margin: 0 auto;
}

.home-rebuild-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(13, 14, 17, 0.6);
    backdrop-filter: blur(12px);
}

.home-rebuild-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.home-rebuild-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.home-rebuild-brand__name {
    color: var(--home-rebuild-text);
    font-family: var(--home-rebuild-display);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1;
}

.home-rebuild-nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.home-rebuild-nav a {
    color: var(--home-rebuild-muted);
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    transition: color 0.3s ease;
}

.home-rebuild-nav a.is-active {
    color: var(--home-rebuild-primary);
    font-weight: 700;
}

.home-rebuild-nav a:hover,
.home-rebuild-mobile-menu__nav a:hover,
.home-rebuild-posts__archive:hover {
    color: var(--home-rebuild-tertiary);
}

.home-rebuild-nav__icon,
.home-rebuild-mobile-button,
.home-rebuild-search-close,
.home-rebuild-mobile-menu__close {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.home-rebuild-mobile-actions {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.home-rebuild-icon {
    display: block;
    width: 24px;
    height: 24px;
}

.home-rebuild-icon--sm {
    width: 20px;
    height: 20px;
}

.home-rebuild-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.home-rebuild-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.home-rebuild-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 51;
    width: 16rem;
    height: 100vh;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    background: var(--home-rebuild-surface);
    box-shadow: var(--home-rebuild-shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.home-rebuild-mobile-menu.is-open {
    transform: translateX(0);
}

.home-rebuild-mobile-menu__head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.home-rebuild-mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-rebuild-mobile-menu__nav a {
    color: var(--home-rebuild-muted);
    font-size: 1.125rem;
    letter-spacing: 0.08em;
    transition: color 0.3s ease;
}

.home-rebuild-mobile-menu__nav a.is-active {
    color: var(--home-rebuild-primary);
    font-weight: 700;
}

.home-rebuild-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8rem;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.home-rebuild-search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.home-rebuild-search-modal {
    width: min(42rem, calc(100% - 2rem));
}

.home-rebuild-search-panel {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: var(--home-rebuild-surface);
    box-shadow: var(--home-rebuild-shadow);
}

.home-rebuild-search-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.home-rebuild-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--home-rebuild-text);
    font-size: 1.125rem;
}

.home-rebuild-search-input::placeholder {
    color: var(--home-rebuild-muted);
}

.home-rebuild-search-hint {
    margin: 1rem 0 0;
    color: var(--home-rebuild-muted);
    font-size: 0.875rem;
    text-align: center;
}

.home-rebuild-main {
    padding-top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.home-rebuild-hero {
    margin-bottom: 3rem;
}

.home-rebuild-title {
    margin: 0 0 1rem;
    color: var(--home-rebuild-text);
    font-family: var(--home-rebuild-display);
    font-size: 3rem;
    font-style: italic;
    font-weight: 200;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.home-rebuild-title span {
    color: var(--home-rebuild-primary);
}

.home-rebuild-summary {
    max-width: 17.5rem;
    margin: 0;
    color: var(--home-rebuild-muted);
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.625;
}

.home-rebuild-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.home-rebuild-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    border-radius: 0.75rem;
    background-color: var(--home-rebuild-surface);
}

.home-rebuild-card::before,
.home-rebuild-card::after {
    content: "";
    position: absolute;
    inset: 0;
}

.home-rebuild-card::before {
    background-position: center;
    background-size: cover;
    transition: transform 0.7s ease;
}

.home-rebuild-card::after {
    background: linear-gradient(to top, rgba(13, 14, 17, 0.9), rgba(13, 14, 17, 0));
}

.home-rebuild-card:hover::before {
    transform: scale(1.05);
}

.home-rebuild-card--archive::before {
    background-image: url("../img/bento-1.webp");
    opacity: 0.4;
    filter: grayscale(1);
}

.home-rebuild-card--archive::after {
    background: linear-gradient(to top, rgba(13, 14, 17, 0.95), rgba(13, 14, 17, 0));
}

.home-rebuild-card--story::before {
    background-image: url("../img/bento-2.webp");
    opacity: 0.3;
}

.home-rebuild-card--story::after {
    background: linear-gradient(to top, rgba(13, 14, 17, 0.98), rgba(13, 14, 17, 0.25), rgba(13, 14, 17, 0));
}

.home-rebuild-card--test::before {
    background-image: url("../img/bento-test.webp");
    opacity: 0.32;
    filter: grayscale(0.25);
}

.home-rebuild-card--test::after {
    background: linear-gradient(to top, rgba(13, 14, 17, 0.96), rgba(66, 48, 52, 0.42), rgba(13, 14, 17, 0.1));
}

.home-rebuild-card__content,
.home-rebuild-card__actions {
    position: relative;
    z-index: 1;
}

.home-rebuild-card__content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding-bottom: 0.25rem;
}

.home-rebuild-card__content--tight {
    padding-bottom: 2rem;
}

.home-rebuild-card__eyebrow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.home-rebuild-card__eyebrow--archive {
    color: var(--home-rebuild-primary);
}

.home-rebuild-card__eyebrow--story {
    color: var(--home-rebuild-tertiary);
}

.home-rebuild-card__eyebrow--test {
    color: #f0d6c9;
}

.home-rebuild-card__title {
    margin: 0;
    color: var(--home-rebuild-text);
    font-family: var(--home-rebuild-display);
    font-size: 1.875rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.2;
}

.home-rebuild-card__summary {
    max-width: 20rem;
    margin: 0.5rem 0 0;
    color: var(--home-rebuild-muted);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.625;
}

.home-rebuild-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.75rem 2rem;
    border-radius: 999px;
    background: var(--home-rebuild-gradient);
    color: var(--home-rebuild-on-primary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.home-rebuild-pill:hover {
    transform: scale(0.95);
}

.home-rebuild-posts {
    padding: 2rem 0;
}

.home-rebuild-posts__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(18, 19, 23, 0.5);
}

.home-rebuild-posts__title {
    margin: 0;
    color: var(--home-rebuild-text);
    font-family: var(--home-rebuild-display);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 400;
}

.home-rebuild-posts__archive {
    color: var(--home-rebuild-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.home-rebuild-post-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-rebuild-post__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-radius: 0.5rem;
    transition: color 0.3s ease;
}

.home-rebuild-post__link:hover .home-rebuild-post__name {
    color: var(--home-rebuild-primary);
}

.home-rebuild-post__text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.home-rebuild-post__date {
    color: var(--home-rebuild-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-rebuild-post__name {
    color: var(--home-rebuild-text);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.home-rebuild-post__icon {
    width: 3.5rem;
    height: 3.5rem;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: var(--home-rebuild-surface-high);
}

.home-rebuild-post--empty {
    padding: 1rem 0;
}

.home-rebuild-post__empty-text {
    color: var(--home-rebuild-muted);
}

.home-rebuild-vault__panel,
.home-rebuild-vault__lock,
.home-rebuild-vault__title,
.home-rebuild-vault__summary,
.home-rebuild-vault__button {
    position: relative;
    z-index: 1;
}

.home-rebuild-vault {
    display: flex;
    justify-content: center;
    margin-bottom: clamp(4rem, 8vw, 7rem);
}

.home-rebuild-vault__panel {
    width: min(100%, 1320px);
    min-height: clamp(18rem, 34vw, 31rem);
    padding: clamp(2.5rem, 5vw, 4rem) 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, #14161c 0%, #121319 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.home-rebuild-vault__lock {
    width: 3.75rem;
    height: 3.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d7c2d4;
}

.home-rebuild-vault__lock svg {
    width: 3rem;
    height: 3rem;
    display: block;
}

.home-rebuild-vault__title {
    margin: 0.9rem 0 0;
    color: var(--home-rebuild-text);
    font-family: var(--home-rebuild-body);
    font-size: clamp(2.2rem, 4vw, 3.25rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.36);
}

.home-rebuild-vault__summary {
    max-width: 45rem;
    margin: 1.35rem auto 0;
    color: rgba(227, 229, 240, 0.58);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.7;
}

.home-rebuild-vault__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 8.75rem;
    min-height: 3.2rem;
    margin-top: 2rem;
    padding: 0.85rem 1.6rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(203, 208, 224, 0.32);
    background: rgba(255, 255, 255, 0.015);
    color: var(--home-rebuild-text);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.home-rebuild-vault__button:hover {
    transform: translateY(-1px);
    border-color: rgba(215, 194, 212, 0.54);
    background: rgba(255, 255, 255, 0.03);
}

.home-rebuild-vault__note {
    margin-top: 1.6rem;
    color: rgba(227, 229, 240, 0.52);
    font-size: 0.9rem;
}

.home-rebuild-vault-feed__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0.65rem 1.05rem;
    border: 1px solid rgba(203, 208, 224, 0.22);
    border-radius: 0.85rem;
    color: rgba(227, 229, 240, 0.78);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.home-rebuild-vault-feed__button:hover {
    transform: translateY(-1px);
    border-color: rgba(215, 194, 212, 0.4);
    background: rgba(255, 255, 255, 0.02);
    color: #fff8f8;
}

@media (min-width: 768px) {
    .home-rebuild-brand__name {
        font-size: 1.5rem;
    }

    .home-rebuild-nav {
        display: inline-flex;
    }

    .home-rebuild-mobile-actions {
        display: none;
    }

    .home-rebuild-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-rebuild-card {
        min-height: 400px;
    }

    .home-rebuild-vault__panel {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 1080px) {
    .home-rebuild-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .home-rebuild-search-panel {
        padding: 1.25rem;
    }

    .home-rebuild-search-form {
        gap: 0.75rem;
    }

    .home-rebuild-post__name {
        font-size: 0.95rem;
    }

    .home-rebuild-vault__panel {
        min-height: 20rem;
        padding: 2.5rem 1.25rem;
    }

    .home-rebuild-vault__title {
        font-size: 2rem;
    }

    .home-rebuild-vault__summary {
        max-width: 19rem;
        font-size: 0.95rem;
    }
}
