:root {
    --zwg-paper: #f5f3ed;
    --zwg-ink: #182344;
    --zwg-muted: #727b8f;
    --zwg-line: rgba(24, 35, 68, .14);
    --zwg-blue: #2f57f2;
    --zwg-lime: #d9f87d;
    --zwg-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    --zwg-sans: "Helvetica Neue", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
    --zwg-serif: "Iowan Old Style", "Baskerville", "Songti SC", "STSong", serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body.zwg-body {
    min-width: 320px;
    color: var(--zwg-ink);
    background: var(--zwg-paper);
    font-family: var(--zwg-sans);
    -webkit-font-smoothing: antialiased;
}

body.zwg-body button,
body.zwg-body textarea {
    font: inherit;
}

a {
    color: inherit;
}

.zwg-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 36%, rgba(162, 196, 255, .3), transparent 31%),
        radial-gradient(circle at 4% 94%, rgba(215, 247, 223, .4), transparent 29%),
        var(--zwg-paper);
}

.zwg-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(24, 35, 68, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 35, 68, .04) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at 68% 50%, #000, transparent 72%);
}

.zwg-grain {
    position: fixed;
    z-index: 100;
    inset: 0;
    pointer-events: none;
    opacity: .022;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.zwg-header {
    position: fixed;
    z-index: 80;
    top: 18px;
    right: 24px;
    left: 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 64px;
    padding: 0 17px;
    border: 1px solid var(--zwg-line);
    border-radius: 15px;
    background: rgba(251, 250, 246, .72);
    box-shadow: 0 14px 38px rgba(50, 64, 102, .07);
    backdrop-filter: blur(22px);
}

.zwg-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.zwg-brand-mark {
    position: relative;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(24, 35, 68, .2);
    border-radius: 50%;
    background: rgba(255, 255, 255, .72);
}

.zwg-brand-mark::before,
.zwg-brand-mark::after {
    content: "";
    position: absolute;
    background: rgba(47, 87, 242, .34);
}

.zwg-brand-mark::before {
    width: 1px;
    height: 100%;
}

.zwg-brand-mark::after {
    width: 100%;
    height: 1px;
}

.zwg-brand-mark i {
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(24, 35, 68, .08);
    border-radius: 50%;
}

.zwg-brand-mark b {
    position: relative;
    z-index: 1;
    padding: 2px 4px;
    color: var(--zwg-blue);
    background: #fbfaf6;
    font-family: var(--zwg-serif);
    font-size: 15px;
    font-weight: 500;
}

.zwg-brand > span:last-child {
    display: grid;
    gap: 3px;
}

.zwg-brand strong {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
}

.zwg-brand small {
    color: #858d9e;
    font-family: var(--zwg-mono);
    font-size: 5px;
    letter-spacing: .08em;
}

.zwg-header-center {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #757e91;
    font-family: var(--zwg-mono);
    font-size: 6px;
    letter-spacing: .1em;
}

.zwg-header-center i,
.zwg-form-head i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #49b97a;
}

.zwg-header-right {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 19px;
    color: #838b9c;
    font-family: var(--zwg-mono);
    font-size: 6px;
}

.zwg-header-right a {
    padding: 10px 12px;
    border: 1px solid var(--zwg-line);
    border-radius: 8px;
    color: var(--zwg-ink);
    background: rgba(255, 255, 255, .48);
    text-decoration: none;
}

.zwg-main {
    min-height: 100vh;
}

.zwg-launch {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, .86fr) minmax(520px, 1.14fr);
    gap: 6vw;
    align-items: center;
    padding: 125px 5.5vw 70px;
}

.zwg-launch-copy h1 {
    margin: 28px 0 24px;
    font-size: clamp(69px, 8.4vw, 132px);
    font-weight: 400;
    line-height: .91;
    letter-spacing: -.08em;
}

.zwg-launch-copy h1 span {
    color: var(--zwg-blue);
    font-family: var(--zwg-serif);
    font-style: italic;
}

.zwg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #707a8e;
    font-family: var(--zwg-mono);
    font-size: 7px;
    letter-spacing: .11em;
}

.zwg-kicker i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--zwg-blue);
    box-shadow: 0 0 0 4px rgba(47, 87, 242, .07);
}

.zwg-launch-copy > p {
    max-width: 510px;
    margin: 0;
    color: #687287;
    font-size: 11px;
    line-height: 1.95;
}

.zwg-steps {
    display: flex;
    max-width: 510px;
    margin-top: 36px;
    border-top: 1px solid var(--zwg-line);
    border-bottom: 1px solid var(--zwg-line);
}

.zwg-steps span {
    display: grid;
    flex: 1;
    gap: 7px;
    padding: 14px 8px 14px 0;
    color: #7c8598;
    font-size: 8px;
}

.zwg-steps b {
    color: var(--zwg-blue);
    font-family: var(--zwg-mono);
    font-size: 6px;
    font-weight: 400;
}

.zwg-quota-note {
    max-width: 510px;
    margin-top: 22px;
    padding: 11px 13px;
    border: 1px solid rgba(47, 87, 242, .14);
    border-radius: 8px;
    color: #5d6880;
    background: rgba(47, 87, 242, .055);
    font-size: 8px;
    line-height: 1.7;
}

.zwg-console {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(24, 35, 68, .17);
    border-radius: 22px;
    background: rgba(252, 252, 249, .76);
    box-shadow: 0 42px 100px rgba(54, 72, 116, .14), inset 0 1px 0 #fff;
    backdrop-filter: blur(24px);
}

.zwg-console-visual {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-bottom: 1px solid var(--zwg-line);
    background:
        radial-gradient(circle at 50% 48%, rgba(152, 188, 255, .34), transparent 28%),
        linear-gradient(rgba(24, 35, 68, .043) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 35, 68, .043) 1px, transparent 1px);
    background-size: auto, 36px 36px, 36px 36px;
    perspective: 800px;
}

.zwg-visual-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(47, 87, 242, .13);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotateX(64deg);
}

.zwg-visual-ring.ring-a {
    width: 380px;
    height: 380px;
}

.zwg-visual-ring.ring-b {
    width: 250px;
    height: 250px;
    border-style: dashed;
    animation: zwgSpin 24s linear infinite;
}

.zwg-visual-core {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border: 1px solid rgba(47, 87, 242, .28);
    border-radius: 50%;
    background: radial-gradient(circle at 31% 27%, #fff, rgba(190, 216, 255, .63) 38%, rgba(244, 247, 252, .78) 70%);
    box-shadow: 0 18px 40px rgba(64, 96, 161, .12);
    transform: translate(-50%, -50%);
}

.zwg-visual-core span {
    color: var(--zwg-blue);
    font-family: var(--zwg-serif);
    font-size: 25px;
    font-style: italic;
}

.zwg-visual-core small {
    position: absolute;
    bottom: 12px;
    color: #8a94a8;
    font-family: var(--zwg-mono);
    font-size: 4px;
}

.zwg-frame {
    position: absolute;
    padding: 9px;
    border: 1px solid rgba(24, 35, 68, .15);
    border-radius: 7px;
    background: rgba(255, 255, 255, .68);
    box-shadow: 0 20px 45px rgba(53, 74, 122, .1);
    backdrop-filter: blur(10px);
}

.zwg-frame i {
    display: block;
    width: 100%;
    height: 55px;
    margin-bottom: 7px;
    border-radius: 3px;
    background:
        radial-gradient(circle at 63% 46%, rgba(47, 87, 242, .24), transparent 16%),
        linear-gradient(130deg, #dfe8fa, #f0f6ff);
}

.zwg-frame span {
    display: block;
    width: 72%;
    height: 4px;
    margin-top: 5px;
    border-radius: 2px;
    background: rgba(24, 35, 68, .1);
}

.zwg-frame span:last-child {
    width: 48%;
}

.frame-a {
    top: 17%;
    left: 14%;
    width: 208px;
    transform: rotateY(22deg) rotateZ(-3deg);
    animation: zwgFloat 7s ease-in-out infinite;
}

.frame-b {
    right: 11%;
    bottom: 13%;
    width: 126px;
    opacity: .68;
    transform: rotateY(-22deg) rotateZ(5deg) scale(.85);
    animation: zwgFloat 8s 1s ease-in-out infinite reverse;
}

.zwg-scan {
    position: absolute;
    z-index: 3;
    top: -20%;
    left: 10%;
    width: 72%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47, 87, 242, .62), transparent);
    box-shadow: 0 0 18px rgba(47, 87, 242, .28);
    animation: zwgScan 5s ease-in-out infinite;
}

.zwg-form {
    padding: 17px;
}

.zwg-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
    color: #7b8498;
    font-family: var(--zwg-mono);
    font-size: 6px;
}

.zwg-form-head > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.zwg-types {
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.zwg-types::-webkit-scrollbar {
    display: none;
}

.zwg-types button {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid var(--zwg-line);
    border-radius: 999px;
    color: #6f798d;
    background: rgba(255, 255, 255, .48);
    font-size: 8px;
    cursor: pointer;
}

.zwg-types button.is-active {
    border-color: rgba(47, 87, 242, .3);
    color: var(--zwg-blue);
    background: rgba(47, 87, 242, .07);
}

.zwg-prompt {
    position: relative;
    display: block;
    padding: 14px 15px 11px;
    border: 1px solid var(--zwg-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .58);
}

.zwg-prompt:focus-within {
    border-color: rgba(47, 87, 242, .4);
    box-shadow: 0 0 0 3px rgba(47, 87, 242, .05);
}

.zwg-prompt > span {
    display: block;
    margin-bottom: 8px;
    color: #858da0;
    font-family: var(--zwg-mono);
    font-size: 5px;
    letter-spacing: .08em;
}

.zwg-prompt textarea {
    display: block;
    width: 100%;
    min-height: 105px;
    padding: 0;
    border: 0;
    outline: 0;
    resize: none;
    color: var(--zwg-ink);
    background: transparent;
    font-size: 11px;
    line-height: 1.8;
}

.zwg-prompt textarea::placeholder {
    color: #9da4b2;
}

.zwg-prompt > small {
    position: absolute;
    right: 14px;
    bottom: 10px;
    color: #939aab;
    font-family: var(--zwg-mono);
    font-size: 5px;
}

.zwg-prompt > small b {
    font-weight: 400;
}

.zwg-error {
    min-height: 15px;
    padding: 4px 2px 0;
    color: #cf4c46;
    font-size: 8px;
}

.zwg-submit {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 9px 18px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: var(--zwg-blue);
    box-shadow: 0 15px 30px rgba(47, 87, 242, .18);
    cursor: pointer;
}

.zwg-submit > span {
    display: grid;
    gap: 4px;
    text-align: left;
}

.zwg-submit strong {
    font-family: var(--zwg-mono);
    font-size: 7px;
    font-weight: 500;
    letter-spacing: .09em;
}

.zwg-submit small {
    color: rgba(255, 255, 255, .62);
    font-size: 7px;
}

.zwg-submit i {
    color: var(--zwg-lime);
    font-size: 19px;
    font-style: normal;
}

.zwg-submit:disabled {
    opacity: .6;
    cursor: default;
}

.zwg-console-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 17px;
    border-top: 1px solid var(--zwg-line);
    color: #9299a8;
    font-family: var(--zwg-mono);
    font-size: 5px;
}

.zwg-build,
.zwg-result {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: none;
    background: #f4f3ed;
}

.zwg-build.is-open {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    align-items: center;
    padding: 7vw;
}

.zwg-build::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 36% 47%, rgba(102, 148, 255, .26), transparent 32%),
        linear-gradient(rgba(24, 35, 68, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 35, 68, .04) 1px, transparent 1px);
    background-size: auto, 72px 72px, 72px 72px;
}

.zwg-build-visual {
    position: relative;
    height: min(64vw, 690px);
    perspective: 1000px;
}

.zwg-build-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 78%;
    aspect-ratio: 1;
    border: 1px solid rgba(47, 87, 242, .18);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotateX(64deg) rotateZ(-16deg);
    animation: zwgBuildOrbit 17s linear infinite;
}

.zwg-build-orbit i {
    position: absolute;
    inset: 13%;
    border: 1px dashed rgba(47, 87, 242, .14);
    border-radius: 50%;
}

.zwg-build-orbit i:nth-child(2) {
    inset: 27%;
}

.zwg-build-orbit i:nth-child(3) {
    inset: 41%;
}

.zwg-build-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 120px;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(47, 87, 242, .3);
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #fff, rgba(183, 211, 255, .72) 37%, rgba(242, 246, 252, .82) 72%);
    box-shadow: 0 0 70px rgba(68, 110, 220, .16);
    transform: translate(-50%, -50%);
}

.zwg-build-core span {
    color: var(--zwg-blue);
    font-family: var(--zwg-serif);
    font-size: 38px;
    font-style: italic;
}

.zwg-build-core small {
    position: absolute;
    bottom: 20px;
    color: #7f8aa2;
    font-family: var(--zwg-mono);
    font-size: 4px;
}

.zwg-build-grid {
    position: absolute;
    inset: 14% 8%;
    border: 1px solid rgba(47, 87, 242, .09);
    transform: rotateY(-18deg) rotateZ(5deg);
}

.zwg-build-grid::before,
.zwg-build-grid::after {
    content: "";
    position: absolute;
    background: rgba(47, 87, 242, .1);
}

.zwg-build-grid::before {
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
}

.zwg-build-grid::after {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
}

.zwg-build-copy {
    position: relative;
    z-index: 2;
}

.zwg-build-copy > span {
    color: var(--zwg-blue);
    font-family: var(--zwg-mono);
    font-size: 7px;
    letter-spacing: .12em;
}

.zwg-build-copy > strong {
    display: block;
    margin: 20px 0 6px;
    color: var(--zwg-blue);
    font-family: var(--zwg-serif);
    font-size: clamp(62px, 8vw, 122px);
    font-style: italic;
    font-weight: 400;
    line-height: 1;
}

.zwg-build-copy h2 {
    margin: 0;
    font-size: clamp(36px, 4vw, 60px);
    font-weight: 400;
    letter-spacing: -.05em;
}

.zwg-build-copy > p {
    max-width: 450px;
    margin: 15px 0 30px;
    color: #727b8e;
    font-size: 10px;
    line-height: 1.8;
}

.zwg-progress {
    width: min(100%, 500px);
    height: 2px;
    overflow: hidden;
    background: rgba(24, 35, 68, .1);
}

.zwg-progress i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--zwg-blue);
    transition: width .8s cubic-bezier(.2, .75, .2, 1);
}

.zwg-build-stages {
    display: flex;
    width: min(100%, 500px);
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: #9aa1af;
    font-family: var(--zwg-mono);
    font-size: 5px;
}

.zwg-build-stages span.is-active {
    color: var(--zwg-blue);
}

.zwg-result.is-open {
    display: flex;
    flex-direction: column;
}

.zwg-result-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 70px;
    padding: 0 22px;
    border-bottom: 1px solid var(--zwg-line);
    background: #fbfaf6;
}

.zwg-result-label {
    color: #7c8598;
    font-family: var(--zwg-mono);
    font-size: 6px;
}

.zwg-result-bar > div {
    display: flex;
    justify-self: end;
    gap: 9px;
}

.zwg-result-bar button,
.zwg-result-bar > div a {
    padding: 9px 11px;
    border: 1px solid var(--zwg-line);
    border-radius: 7px;
    color: var(--zwg-ink);
    background: rgba(255, 255, 255, .52);
    font-size: 8px;
    text-decoration: none;
    cursor: pointer;
}

.zwg-result-bar > div a {
    color: #fff;
    background: var(--zwg-blue);
}

#zwgPreviewFrame {
    width: 100%;
    height: calc(100vh - 70px);
    border: 0;
    background: #f5f3ed;
}

.zwg-toast {
    position: fixed;
    z-index: 220;
    right: 20px;
    bottom: 20px;
    max-width: 320px;
    padding: 12px 15px;
    border: 1px solid var(--zwg-line);
    border-radius: 10px;
    color: var(--zwg-ink);
    background: rgba(251, 250, 246, .96);
    box-shadow: 0 18px 40px rgba(45, 58, 91, .16);
    font-size: 9px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}

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

@keyframes zwgSpin {
    to { transform: translate(-50%, -50%) rotateX(64deg) rotateZ(360deg); }
}

@keyframes zwgFloat {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -12px; }
}

@keyframes zwgScan {
    0%, 100% { top: -10%; opacity: 0; }
    15% { opacity: 1; }
    80% { opacity: 1; }
    90% { top: 110%; opacity: 0; }
}

@keyframes zwgBuildOrbit {
    from { transform: translate(-50%, -50%) rotateX(64deg) rotateZ(-16deg); }
    to { transform: translate(-50%, -50%) rotateX(64deg) rotateZ(344deg); }
}

@media (max-width: 1000px) {
    .zwg-header {
        top: 10px;
        right: 12px;
        left: 12px;
        grid-template-columns: 1fr auto;
    }

    .zwg-header-center {
        display: none;
    }

    .zwg-launch {
        grid-template-columns: 1fr;
        gap: 45px;
        padding: 105px 20px 60px;
    }

    .zwg-launch-copy {
        max-width: 700px;
    }

    .zwg-launch-copy h1 {
        font-size: clamp(65px, 11vw, 104px);
    }

    .zwg-console {
        width: 100%;
        max-width: 720px;
        justify-self: center;
    }

    .zwg-build.is-open {
        grid-template-columns: 1fr;
        padding: 90px 30px 35px;
    }

    .zwg-build-visual {
        height: min(62vw, 470px);
    }

    .zwg-build-copy {
        max-width: 640px;
    }
}

@media (max-width: 600px) {
    .zwg-brand small,
    .zwg-header-right > span {
        display: none;
    }

    .zwg-launch {
        padding-top: 92px;
    }

    .zwg-launch-copy h1 {
        font-size: clamp(53px, 17vw, 82px);
    }

    .zwg-steps span {
        padding-right: 5px;
        font-size: 7px;
    }

    .zwg-console-visual {
        height: 220px;
    }

    .zwg-visual-ring.ring-a {
        width: 290px;
        height: 290px;
    }

    .frame-a {
        width: 170px;
        left: 8%;
    }

    .frame-b {
        display: none;
    }

    .zwg-form {
        padding: 13px;
    }

    .zwg-prompt textarea {
        min-height: 92px;
    }

    .zwg-build {
        overflow-y: auto;
    }

    .zwg-build.is-open {
        padding: 82px 18px 25px;
    }

    .zwg-build-visual {
        height: 280px;
    }

    .zwg-build-copy > strong {
        font-size: 60px;
    }

    .zwg-build-copy h2 {
        font-size: 32px;
    }

    .zwg-build-stages {
        font-size: 4px;
    }

    .zwg-result-bar {
        grid-template-columns: 1fr auto;
        padding: 0 12px;
    }

    .zwg-result-label {
        display: none;
    }

    .zwg-result-bar > div {
        gap: 5px;
    }

    .zwg-result-bar button,
    .zwg-result-bar > div a {
        padding: 8px;
        font-size: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
