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

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

.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);
}

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

.model-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-overview.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);
}

.model-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;
}

.model-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;
}

.model-hero__panel,
.model-route-board,
.model-hero-preview,
.truth-card,
.resource-card,
.step-card,
.command-strip article,
.verify-card,
.prompt-panel,
.snail-showcase,
.toolkit-model {
    position: relative;
    overflow: hidden;
}

.model-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);
}

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

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

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

.model-kicker,
.model-title,
.model-hero__title,
.mc-action,
.model-route-board__head,
.truth-card span,
.truth-card h3,
.resource-card span,
.resource-card h3,
.step-card span,
.step-card h3,
.command-strip__head,
.verify-card h3,
.prompt-panel h2,
.prompt-choice__head,
.snail-viewer__hud,
.toolkit-points span,
.toolkit-model__panel h3 {
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.model-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;
}

.model-hero__title {
    margin: 18px 0 0;
    color: #fff;
    font-size: clamp(2.3rem, 4.8vw, 4.4rem);
    line-height: 1;
    letter-spacing: 0;
    font-weight: 400;
}

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

.model-hero__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.1rem;
    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);
}

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

.model-route-board {
    padding: 24px;
    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);
}

.model-hero-preview {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    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);
}

.model-hero-preview__head {
    margin-bottom: 18px;
}

.model-hero-preview__head strong {
    display: block;
    margin-top: 12px;
    color: #fff4dd;
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    line-height: 1.08;
    font-weight: 400;
}

.model-hero-preview__head p {
    margin: 12px 0 0;
    color: rgba(250, 244, 232, 0.9);
    line-height: 1.65;
}

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

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

.model-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;
}

.model-route-board__grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

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

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

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

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

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

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

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

.truth-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 {
    color: #d7f36d;
    font-size: 0.92rem;
}

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

.truth-card p,
.resource-card p,
.step-card p,
.verify-card p,
.toolkit-model p {
    color: rgba(250, 244, 232, 0.94);
    line-height: 1.76;
}

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

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

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

.resource-card {
    min-height: 170px;
    padding: 22px;
    color: #f4ead9;
    text-decoration: none;
    background: rgba(31, 30, 27, 0.92);
    border: 1px solid rgba(255, 235, 205, 0.14);
    box-shadow: var(--wood-shadow);
    transition: transform 160ms ease, filter 160ms ease;
}

.resource-card:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.resource-card span {
    color: #d7f36d;
    font-size: 0.86rem;
}

.resource-card h3 {
    margin: 16px 0 0;
    color: #fff4dd;
    font-size: 1.35rem;
    line-height: 1.12;
    font-weight: 400;
}

.resource-card p {
    margin: 12px 0 0;
    overflow-wrap: anywhere;
}

.resource-card--actions {
    display: flex;
    flex-direction: column;
}

.resource-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
}

.resource-card__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    color: #fff4dd;
    text-decoration: none;
    border: 1px solid rgba(255, 235, 205, 0.22);
    background: rgba(255, 255, 255, 0.06);
}

.resource-card__actions a:hover {
    background: rgba(79, 158, 58, 0.32);
    border-color: rgba(215, 243, 109, 0.55);
}

.command-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

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

.command-strip__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: #fff4dd;
    background: rgba(10, 10, 10, 0.22);
    border-bottom: 1px solid rgba(255, 235, 205, 0.12);
}

.command-strip__head button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(183, 213, 58, 0.42);
    background: rgba(183, 213, 58, 0.14);
    color: #d7f36d;
    cursor: pointer;
    font-family: inherit;
}

.command-strip pre,
.verify-card pre,
.prompt-box {
    min-width: 0;
    margin: 0;
    padding: 18px;
    overflow: auto;
    white-space: pre-wrap;
    color: #fff4dd;
    background: rgba(10, 10, 10, 0.34);
    line-height: 1.65;
    font-family: Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

.step-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

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

.step-card button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.28);
    cursor: zoom-in;
}

.step-card button:hover img {
    filter: brightness(1.08);
}

.step-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: filter 160ms ease;
}

.step-card span,
.step-card h3,
.step-card p {
    display: block;
    margin-left: 16px;
    margin-right: 16px;
}

.step-card span {
    margin-top: 14px;
    color: #d7f36d;
    font-size: 0.9rem;
}

.step-card h3 {
    margin-top: 10px;
    margin-bottom: 0;
    color: #fff4dd;
    font-size: 1.2rem;
    line-height: 1.12;
    font-weight: 400;
}

.step-card p {
    margin-top: 10px;
    margin-bottom: 16px;
    font-size: 0.94rem;
}

.verify-card {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(260px, 0.36fr) minmax(0, 0.64fr);
    gap: 20px;
    padding: 26px;
    color: #f4ead9;
    background: linear-gradient(135deg, #21360f 0%, #3e611d 52%, #2b4512 100%);
    box-shadow: var(--wood-shadow);
}

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

.verify-card__prompt {
    min-width: 0;
    display: grid;
    gap: 14px;
}

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

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

.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;
}

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

.prompt-choice {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

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

.prompt-choice__head {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #fff4dd;
}

.prompt-box {
    flex: 0 0 auto;
    height: 348px;
    max-height: none;
    border: 1px solid rgba(255, 235, 205, 0.2);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.42) rgba(10, 10, 10, 0.24);
}

.prompt-box::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.prompt-box::-webkit-scrollbar-track {
    background: rgba(10, 10, 10, 0.24);
}

.prompt-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.36);
    border-radius: 999px;
}

.prompt-box::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.54);
}

.snail-showcase {
    display: grid;
    grid-template-columns: minmax(280px, 0.35fr) minmax(0, 0.65fr);
    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);
}

.model-format-note {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.model-format-note 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;
}

.snail-viewer {
    position: relative;
    min-height: 430px;
    background-color: #141414;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(79, 158, 58, 0.12), transparent 62%);
    background-size: 28px 28px, 28px 28px, 100% 100%;
    background-position: center;
    border: 1px solid rgba(255, 235, 205, 0.14);
    overflow: hidden;
}

.snail-viewer canvas {
    display: block;
    width: 100%;
    height: 430px;
    cursor: grab;
}

.model-hero-preview .snail-viewer {
    min-height: 370px;
}

.model-hero-preview .snail-viewer canvas {
    height: 370px;
}

.snail-viewer canvas:active {
    cursor: grabbing;
}

.snail-viewer__hud {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 9px 12px;
    color: #fff4dd;
    background: rgba(10, 10, 10, 0.52);
    border: 1px solid rgba(255, 235, 205, 0.16);
    font-size: 0.84rem;
}

.toolkit-model {
    display: grid;
    grid-template-columns: minmax(300px, 0.48fr) minmax(0, 0.52fr);
    gap: 24px;
    align-items: center;
    padding: 28px;
    color: #f4ead9;
    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);
    box-shadow: var(--wood-shadow);
}

.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;
}

.toolkit-model__panel {
    display: grid;
    gap: 16px;
}

.toolkit-model__panel article {
    padding: 22px;
    background: rgba(10, 10, 10, 0.2);
    border: 1px solid rgba(255, 235, 205, 0.16);
}

.toolkit-model__panel span {
    color: #d7f36d;
}

.toolkit-model__panel h3 {
    margin: 14px 0 0;
    color: #fff4dd;
    font-size: 1.45rem;
    line-height: 1.12;
    font-weight: 400;
}

.toolkit-model__panel p {
    margin: 12px 0 0;
}

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

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

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

.image-preview__dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, 96vw);
    max-height: 90vh;
    background: #111;
    border: 1px solid rgba(255, 235, 205, 0.2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.image-preview__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: #fff4dd;
    border-bottom: 1px solid rgba(255, 235, 205, 0.12);
}

.image-preview__bar button {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.image-preview__bar .image-preview__copy {
    width: auto;
    min-width: 138px;
    padding: 0 14px;
    margin-left: auto;
    color: #fff4dd;
    background: rgba(79, 79, 79, 0.72);
}

.image-preview__bar .image-preview__copy:hover {
    background: rgba(94, 94, 94, 0.9);
}

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

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

.image-preview__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 64px;
    border: 1px solid rgba(255, 235, 205, 0.22);
    background: rgba(17, 17, 17, 0.72);
    color: #fff4dd;
    cursor: pointer;
    font-size: 2.6rem;
    line-height: 1;
    transform: translateY(-50%);
}

.image-preview__nav:hover {
    background: rgba(79, 158, 58, 0.82);
}

.image-preview__nav--prev {
    left: 12px;
}

.image-preview__nav--next {
    right: 12px;
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    padding: 12px 16px;
    color: #fff4dd;
    background: rgba(17, 17, 17, 0.96);
    border: 1px solid rgba(255, 235, 205, 0.18);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1180px) {
    .model-hero__inner,
    .model-split,
    .prompt-panel,
    .snail-showcase,
    .toolkit-model {
        grid-template-columns: 1fr;
    }

    .command-strip {
        grid-template-columns: 1fr;
    }

    .step-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .topbar-tools {
        justify-self: center;
    }

    .model-hero__inner {
        width: min(100% - 32px, 720px);
        min-height: auto;
        padding: 38px 0;
    }

    .truth-grid,
    .link-grid,
    .step-grid {
        grid-template-columns: 1fr;
    }

    .snail-viewer,
    .snail-viewer canvas {
        min-height: 340px;
        height: 340px;
    }
}

@media (max-width: 640px) {
    .model-content {
        width: min(100% - 20px, 560px);
        margin-top: 20px;
    }

    .model-hero__panel,
    .model-route-board,
    .verify-card,
    .prompt-panel,
    .snail-showcase,
    .toolkit-model {
        padding: 20px;
    }

    .model-hero__title {
        font-size: 2.25rem;
    }

    .model-hero__actions,
    .prompt-choice__head {
        align-items: stretch;
        flex-direction: column;
    }

    .prompt-panel {
        min-height: auto;
    }

    .prompt-box {
        height: 320px;
    }

    .mc-action {
        width: 100%;
        padding: 0 16px;
    }

    .profile-menu__name {
        display: none;
    }
}
