.texture-body {
    min-height: 100vh;
}

.topbar-tools {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

.language-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(27, 27, 27, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.language-tabs__button {
    min-width: 36px;
    min-height: 34px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.language-tabs__button:hover,
.language-tabs__button.is-active {
    background: #2f8f1f;
    color: #fff;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28);
}

.language-cycle {
    min-width: 48px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #2f8f1f;
    color: #fff;
    cursor: pointer;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
    box-shadow:
        inset 0 -4px 0 rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 219, 153, 0.08);
}

.language-cycle:hover {
    filter: brightness(1.08);
}

.texture-main {
    width: 100%;
    padding-bottom: 24px;
}

.texture-hero {
    position: relative;
    min-height: calc(100vh - 86px);
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(13, 13, 13, 0.96) 0%, rgba(13, 13, 13, 0.86) 48%, rgba(13, 13, 13, 0.68) 100%),
        linear-gradient(180deg, rgba(17, 17, 17, 0.18), rgba(17, 17, 17, 0.96)),
        url("../assets/images/homepage-hero-maker.png") center / cover no-repeat,
        #111;
    border-top: 1px solid rgba(113, 82, 45, 0.48);
    border-bottom: 1px solid rgba(113, 82, 45, 0.48);
    box-shadow: var(--shadow);
}

.texture-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow:
        inset 0 0 0 1px rgba(255, 230, 180, 0.12),
        inset 0 -120px 110px rgba(17, 17, 17, 0.92);
    pointer-events: none;
}

.texture-hero__inner {
    position: relative;
    z-index: 1;
    width: min(1440px, calc(100% - 104px));
    min-height: calc(100vh - 86px);
    margin: 0 auto;
    padding: 58px 0 52px;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.9fr);
    gap: 42px;
    align-items: center;
}

.texture-hero__panel,
.texture-showcase,
.truth-card,
.tool-card,
.workflow-card,
.prompt-panel,
.works-panel,
.works-strip,
.converter-link-card,
.toolkit-texture {
    position: relative;
    overflow: hidden;
}

.texture-hero__panel {
    padding: 34px 42px 36px;
    color: #fff;
    background: rgba(18, 18, 18, 0.96);
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.36);
}

.texture-hero__panel::before,
.texture-hero__panel::after {
    content: "";
    position: absolute;
    top: -46px;
    width: 56px;
    height: 46px;
    background: rgba(18, 18, 18, 0.96);
}

.texture-hero__panel::before {
    right: 88px;
}

.texture-hero__panel::after {
    right: 0;
}

.texture-kicker,
.texture-title,
.texture-hero__title,
.mc-action,
.texture-showcase__head,
.texture-sample span,
.truth-card span,
.truth-card h3,
.workflow-card span,
.workflow-card h3,
.prompt-panel h3,
.tool-card h3,
.mango-compare span {
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.texture-kicker {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 4px 12px;
    color: #d7f36d;
    background: rgba(183, 213, 58, 0.12);
    border: 1px solid rgba(183, 213, 58, 0.24);
    font-size: 0.9rem;
}

.texture-hero__title {
    margin: 18px 0 0;
    color: #fff;
    font-size: clamp(2.1rem, 4.3vw, 4rem);
    line-height: 1;
    letter-spacing: 0;
    font-weight: 400;
}

.texture-hero__desc,
.texture-lead {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
    line-height: 1.78;
}

.texture-hero__actions,
.works-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.mc-action {
    position: relative;
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        inset 0 -4px 0 rgba(0, 0, 0, 0.28),
        0 10px 20px rgba(0, 0, 0, 0.22);
    font-size: 1rem;
    line-height: 1.1;
    transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.mc-action::after {
    content: "›";
    margin-left: 10px;
    font-size: 1.3rem;
    line-height: 1;
}

.mc-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.mc-action--primary {
    background: #4f9e3a;
    border-color: #79c75d;
}

.mc-action--secondary {
    background: rgba(32, 32, 32, 0.9);
    border-color: rgba(255, 255, 255, 0.22);
}

.texture-showcase,
.texture-route-board {
    padding: 18px;
    color: #f4ead9;
    background: rgba(18, 18, 18, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 26px rgba(0, 0, 0, 0.22);
}

.texture-showcase--hero {
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.texture-showcase__head span,
.texture-showcase__head strong,
.texture-route-board__head span,
.texture-route-board__head strong {
    display: block;
}

.texture-showcase__head span,
.texture-route-board__head span {
    color: #d7f36d;
    font-size: 0.9rem;
}

.texture-showcase__head strong,
.texture-route-board__head strong {
    margin-top: 10px;
    color: #fff4dd;
    font-size: clamp(1.28rem, 2.1vw, 1.86rem);
    line-height: 1.12;
    font-weight: 400;
}

.texture-showcase__head p {
    margin: 12px 0 0;
    color: rgba(250, 244, 232, 0.9);
    line-height: 1.62;
}

.texture-showcase__grid,
.texture-route-board__grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.texture-route-board__grid {
    grid-template-columns: 1fr;
}

.texture-route-board__grid article {
    padding: 18px;
    background: rgba(10, 10, 10, 0.2);
    border: 1px solid rgba(255, 235, 205, 0.16);
}

.texture-route-board__grid span {
    color: #d7f36d;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.texture-route-board__grid h3 {
    margin: 10px 0 0;
    color: #fff4dd;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
}

.texture-route-board__grid p {
    margin: 10px 0 0;
    color: rgba(250, 244, 232, 0.9);
    line-height: 1.58;
}

.texture-sample,
.works-gallery button,
.mango-compare button,
.tool-card__media {
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    cursor: zoom-in;
    font: inherit;
}

.texture-sample {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(255, 235, 205, 0.18);
    text-align: center;
}

.texture-sample--green {
    background: linear-gradient(135deg, #21360f 0%, #3e611d 56%, #2b4512 100%);
}

.texture-sample--amber {
    background: linear-gradient(135deg, #4a2d09 0%, #734510 56%, #56330b 100%);
}

.texture-sample--blue {
    background: linear-gradient(135deg, #0b2736 0%, #114963 56%, #0b2d3d 100%);
}

.texture-sample:hover,
.works-gallery button:hover,
.mango-compare button:hover,
.tool-card__media:hover {
    transform: translateY(-3px);
}

.texture-sample img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    image-rendering: pixelated;
    background: rgba(10, 10, 10, 0.18);
}

.texture-sample span {
    display: block;
    margin-top: 12px;
    color: #fff4dd;
}

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

.texture-gallery__tile {
    position: relative;
    margin: 0;
    padding: 8px;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 235, 205, 0.18);
    color: inherit;
    cursor: zoom-in;
    font: inherit;
    background:
        linear-gradient(135deg, rgba(40, 38, 35, 0.92), rgba(28, 26, 24, 0.96)),
        rgba(10, 10, 10, 0.24);
    overflow: hidden;
}

.texture-gallery__tile:disabled {
    cursor: default;
}

.texture-gallery__tile::before {
    content: "";
    position: absolute;
    inset: 12px;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    opacity: 0.72;
}

.texture-gallery__tile img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    image-rendering: pixelated;
}

.texture-gallery__tile span {
    position: absolute;
    left: 12px;
    bottom: 10px;
    z-index: 2;
    color: #fff4dd;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
    font-size: 0.84rem;
    opacity: 0.78;
}

.texture-content {
    width: min(1440px, calc(100% - 32px));
    margin: 32px auto 0;
}

.texture-section {
    scroll-margin-top: 110px;
}

.truth-grid,
.workflow-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.truth-card,
.workflow-card {
    min-height: 210px;
    padding: 24px;
    color: #f4ead9;
    box-shadow: var(--wood-shadow);
    border: 1px solid rgba(255, 235, 205, 0.13);
}

.truth-card--blue {
    background: linear-gradient(135deg, #0b2736 0%, #114963 52%, #0b2d3d 100%);
}

.truth-card--green {
    background: linear-gradient(135deg, #21360f 0%, #3e611d 52%, #2b4512 100%);
}

.truth-card--amber {
    background: linear-gradient(135deg, #4a2d09 0%, #734510 56%, #56330b 100%);
}

.truth-card span,
.workflow-card span {
    color: #d7f36d;
    font-size: 0.92rem;
}

.truth-card h3,
.workflow-card h3 {
    margin: 18px 0 0;
    color: #fff4dd;
    font-size: 1.4rem;
    line-height: 1.12;
    font-weight: 400;
}

.truth-card p,
.workflow-card p,
.tool-card p,
.prompt-panel p,
.works-panel p,
.toolkit-texture p {
    color: rgba(250, 244, 232, 0.94);
    line-height: 1.76;
}

.texture-split {
    display: grid;
    grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.66fr);
    gap: 24px;
    align-items: stretch;
}

.texture-split__copy,
.works-panel__copy,
.toolkit-texture__copy {
    min-width: 0;
}

.texture-title {
    margin: 16px 0 0;
    color: #fff4dd;
    font-size: clamp(1.78rem, 3vw, 2.72rem);
    line-height: 1;
    letter-spacing: 0;
    font-weight: 400;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tool-card {
    color: #f4ead9;
    background: rgba(31, 30, 27, 0.92);
    border: 1px solid rgba(255, 235, 205, 0.14);
    box-shadow: var(--wood-shadow);
}

.tool-card__media {
    display: block;
    width: 100%;
    background: rgba(0, 0, 0, 0.28);
}

.tool-card__media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 8.2;
    object-fit: cover;
}

.tool-card__body {
    padding: 20px;
}

.tool-card h3 {
    margin: 0;
    color: #fff4dd;
    font-size: 1.45rem;
    font-weight: 400;
}

.tool-card a {
    display: inline-flex;
    margin-top: 12px;
    color: #d7f36d;
    text-decoration: none;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.tool-card a::after {
    content: "›";
    margin-left: 8px;
}

.workflow-card {
    background: rgba(31, 30, 27, 0.92);
}

.prompt-panel {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
    gap: 20px;
    padding: 26px;
    color: #f4ead9;
    background: linear-gradient(135deg, #0b2736 0%, #114963 52%, #0b2d3d 100%);
    box-shadow: var(--wood-shadow);
}

.prompt-panel h3 {
    margin: 16px 0 0;
    color: #fff4dd;
    font-size: 1.7rem;
    line-height: 1.12;
    font-weight: 400;
}

.prompt-box {
    min-width: 0;
    max-height: 360px;
    margin: 0;
    padding: 18px;
    overflow: auto;
    white-space: pre-wrap;
    color: #fff4dd;
    background: rgba(10, 10, 10, 0.34);
    border: 1px solid rgba(255, 235, 205, 0.2);
    line-height: 1.65;
    font-family: Menlo, Consolas, monospace;
    font-size: 0.92rem;
}

.works-panel,
.works-strip,
.toolkit-texture {
    display: grid;
    grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
    gap: 24px;
    align-items: center;
    padding: 28px;
    color: #f4ead9;
    background: rgba(31, 30, 27, 0.92);
    border: 1px solid rgba(255, 235, 205, 0.14);
    box-shadow: var(--wood-shadow);
}

.works-strip {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 24px 28px;
}

.works-strip h2 {
    margin: 14px 0 0;
    color: #fff4dd;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
    font-size: clamp(1.45rem, 2.6vw, 2.25rem);
    line-height: 1;
    font-weight: 400;
}

.works-strip p {
    margin: 12px 0 0;
    color: rgba(250, 244, 232, 0.9);
    line-height: 1.68;
}

.works-strip__actions {
    display: grid;
    gap: 12px;
    align-content: center;
    min-width: 220px;
}

.works-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.works-gallery button,
.mango-compare button {
    display: block;
    width: 100%;
    background: rgba(10, 10, 10, 0.22);
    border: 1px solid rgba(255, 235, 205, 0.16);
}

.works-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    image-rendering: pixelated;
}

.toolkit-texture {
    background:
        linear-gradient(90deg, rgba(33, 54, 15, 0.98), rgba(62, 97, 29, 0.92)),
        url("../assets/images/homepage-hero-workshop.png") center / cover no-repeat;
    border: 2px solid rgba(183, 213, 58, 0.38);
}

.toolkit-points {
    display: grid;
    gap: 10px;
    margin: 18px 0 22px;
}

.toolkit-points span {
    display: block;
    padding: 12px 14px;
    color: #fff4dd;
    background: rgba(10, 10, 10, 0.18);
    border: 1px solid rgba(255, 235, 205, 0.16);
    line-height: 1.5;
}

.mango-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mango-compare article {
    min-width: 0;
}

.mango-compare img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    image-rendering: pixelated;
    background: #fff;
}

.mango-compare span {
    display: block;
    margin-top: 10px;
    color: #fff4dd;
    text-align: center;
}

.mango-compare p {
    margin: 10px 0 0;
    color: rgba(250, 244, 232, 0.88);
    font-size: 0.94rem;
    line-height: 1.62;
}

.prompt-panel--dual {
    grid-template-columns: minmax(250px, 0.28fr) minmax(0, 0.72fr);
}

.prompt-panel--dual .prompt-panel__copy {
    grid-row: 1 / 3;
}

.texture-prompt-tabs {
    display: inline-flex;
    gap: 6px;
    margin: 0 0 14px;
    padding: 5px;
    background: rgba(10, 10, 10, 0.28);
    border: 1px solid rgba(255, 235, 205, 0.16);
}

.texture-prompt-tabs__button {
    min-height: 38px;
    min-width: 92px;
    border: 0;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    cursor: pointer;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.texture-prompt-tabs__button.is-active {
    color: #fff;
    background: #4f9e3a;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28);
}

.prompt-choice-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.prompt-choice {
    min-width: 0;
}

.prompt-choice[hidden] {
    display: none;
}

.prompt-choice__head {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.prompt-choice__head span {
    color: #fff4dd;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
    font-size: 1.08rem;
}

.prompt-choice .mc-action {
    width: 100%;
    min-height: 46px;
}

.converter-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    color: #f4ead9;
    background: linear-gradient(135deg, #0b2736 0%, #114963 52%, #0b2d3d 100%);
    border: 1px solid rgba(255, 235, 205, 0.14);
    box-shadow: var(--wood-shadow);
}

.converter-link-card > div {
    max-width: 760px;
}

.image-preview[hidden] {
    display: none;
}

.image-preview {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.image-preview__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.78);
}

.image-preview__dialog {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    background: #151515;
    border: 1px solid rgba(255, 235, 205, 0.18);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.46);
}

.image-preview__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 10px 14px;
    color: #fff4dd;
    background: rgba(31, 30, 27, 0.98);
    border-bottom: 1px solid rgba(255, 235, 205, 0.14);
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.image-preview__bar button {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 235, 205, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff4dd;
    cursor: pointer;
    font-size: 1.5rem;
}

.image-preview__dialog img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 96px);
    object-fit: contain;
    background: #0d0d0d;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 90;
    transform: translate(-50%, 16px);
    padding: 12px 16px;
    color: #fff;
    background: rgba(18, 18, 18, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
    .texture-hero__inner {
        width: min(100% - 40px, 980px);
        grid-template-columns: 1fr;
        padding-top: 42px;
    }

    .texture-split,
    .prompt-panel,
    .works-panel,
    .works-strip,
    .toolkit-texture {
        grid-template-columns: 1fr;
    }

    .converter-link-card {
        display: block;
    }

    .converter-link-card .mc-action {
        margin-top: 18px;
    }
}

@media (max-width: 860px) {
    .texture-content {
        width: min(100% - 24px, 720px);
    }

    .truth-grid,
    .workflow-grid,
    .tool-grid,
    .works-gallery,
    .prompt-choice-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 640px) {
    .texture-hero__inner {
        width: min(100% - 24px, 560px);
        min-height: auto;
        gap: 24px;
        padding: 26px 0 34px;
    }

    .texture-hero__panel,
    .texture-showcase,
    .prompt-panel,
    .works-panel,
    .works-strip,
    .toolkit-texture {
        padding: 20px;
    }

    .texture-showcase__grid,
    .mango-compare {
        grid-template-columns: 1fr;
    }

    .texture-hero__actions,
    .works-panel__actions,
    .works-strip__actions {
        display: grid;
    }

    .texture-title {
        font-size: clamp(1.58rem, 9vw, 2.25rem);
    }

    .texture-hero__title {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .truth-card,
    .workflow-card {
        min-height: auto;
    }

}
