/* Isolated documentation concept. Component geometry is simulated inside each scene. */
body.modal-builder-page {
    --page-bg: #0c1018;
    --line: #ffffff20;
    --muted: #9daab9;
    --mint: #6bdfb0;
    --sidebar-width: 248px;
    --header-height: 76px;
    background: var(--page-bg);
    color: #eef3f7;
    font: 400 16px/1.5 "Wix Madefor Text", sans-serif;
    margin: 0;
}

.modal-builder-page * {
    box-sizing: border-box;
}

.modal-builder-page [hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

.modal-builder-page button, .modal-builder-page input {
    font: inherit;
}

.modal-builder-page button {
    cursor: pointer;
}

.modal-builder-page a {
    color: inherit;
    text-decoration: none;
}

.modal-builder-page button:focus-visible, .modal-builder-page a:focus-visible, .modal-builder-page input:focus-visible, .modal-builder-page summary:focus-visible, .recipe-rail:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 5px;
}

.modal-builder-page h1, .modal-builder-page h2, .modal-builder-page h3, .modal-builder-page p {
    margin: 0;
}

.modal-builder-page h1, .modal-builder-page h2, .modal-builder-page h3 {
    font-family: "Wix Madefor Display", "Wix Madefor Text", sans-serif;
    font-weight: 400;
}

.modal-builder-page code {
    color: #b3c6d7;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.page-content {
    margin-left: var(--sidebar-width);
    min-width: 0;
}

.wrap {
    width: min(1240px, calc(100% - 64px));
    margin-inline: auto;
}

.muted {
    color: var(--muted);
}

.page-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 32px;
    border-bottom: 1px solid var(--line);
    padding: 0 32px 0 0;
    background: #0c1018ed;
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    flex: 0 0 var(--sidebar-width);
    height: 100%;
    padding-left: 24px;
    border-right: 1px solid var(--line);
}

.brand img {
    width: 150px;
    height: auto;
}

.brand span {
    display: none;
}

.page-header nav {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: #c0cad5;
}

.page-header a:hover, .text-link:hover {
    color: var(--mint);
}

.version-link {
    font-size: 13px;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 10px 15px;
    white-space: nowrap;
    margin-left: auto;
}

.version-link span {
    margin-left: 12px;
}

.menu-toggle, .menu-close {
    display: none;
}

.docs-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    z-index: 40;
    background: #0e141e;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.sidebar-top {
    padding: 23px 17px 18px;
    flex-shrink: 0;
}

.sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
    margin-bottom: 15px;
    color: #9aaab9;
    font-size: 12px;
}

.docs-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    min-height: 40px;
    border: 1px solid #ffffff1c;
    border-radius: 9px;
    background: #161e29;
    color: #8295a5;
}

.docs-search:focus-within {
    border-color: #6bdfb08c;
    box-shadow: 0 0 0 3px #6bdfb010;
}

.docs-search > svg {
    flex: 0 0 17px;
}

.docs-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: #e1eaf1;
    font-size: 12px;
    outline: 0 !important;
    box-shadow: none;
}

.docs-search input::placeholder {
    color: #8393a3;
}

.docs-search input::-webkit-search-cancel-button {
    appearance: none;
}

.docs-search kbd {
    font: 10px "Wix Madefor Text", sans-serif;
    background: #202b37;
    color: #8c9eac;
    border-radius: 4px;
    padding: 2px 4px;
    white-space: nowrap;
}

.search-clear {
    background: transparent;
    border: 0;
    padding: 0;
    flex-shrink: 0;
    color: #acbcca;
    width: 18px;
    font-size: 19px !important;
    line-height: 1;
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #34413d transparent;
    padding: 0 17px 24px;
}

.nav-group + .nav-group {
    margin-top: 24px;
}

.nav-group h2 {
    color: #e0e7ed;
    font: 500 13px/1.4 "Wix Madefor Text", sans-serif;
    margin: 0 7px 9px;
}

.nav-group a, .nav-section > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 10px;
    color: #99a9b8;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.4;
}

.nav-group a:hover, .nav-section > summary:hover {
    background: #ffffff06;
    color: #d9e6ef;
}

.nav-section > summary {
    list-style: none;
    cursor: pointer;
    color: #c0cdd8;
}

.nav-section > summary::-webkit-details-marker {
    display: none;
}

.nav-section > summary svg {
    width: 13px;
    height: 13px;
    margin-left: auto;
    flex-shrink: 0;
    opacity: .65;
    transition: transform .18s;
}

.nav-section[open] > summary svg {
    transform: rotate(90deg);
}

.nav-children {
    margin: 3px 0 8px 11px;
    padding-left: 10px;
    border-left: 1px solid #ffffff15;
}

.nav-group a[aria-current="page"] {
    background: #6bdfb013;
    color: #77e5b9;
    font-weight: 500;
}

.nav-current-mark {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    margin-left: auto;
}

.nav-page-links {
    display: none;
}

.sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 15px 24px;
    border-top: 1px solid var(--line);
    color: #647c70;
    font-size: 11px;
    flex-shrink: 0;
}

.sidebar-bottom a {
    color: #91ac9d;
}

.search-feedback {
    font-size: 12px;
    color: #8fbaa2;
    padding: 0 7px 17px;
}

.search-empty {
    padding: 6px 7px;
}

.search-empty strong {
    font-size: 14px;
    font-weight: 500;
    color: #c5d4cd;
}

.search-empty p {
    font-size: 13px;
    color: #82978b;
    margin-top: 8px;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: #02070dc4;
    backdrop-filter: blur(3px);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding-block: 60px 66px;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--mint);
}

.eyebrow span {
    color: #61717f;
    margin-inline: 10px;
}

.hero h1 {
    font-size: clamp(78px, 8vw, 116px);
    letter-spacing: -.075em;
    line-height: 1;
    margin-top: 20px;
}

.hero h1 > span {
    color: var(--mint);
}

.hero-lead {
    font-size: clamp(25px, 2.7vw, 38px);
    letter-spacing: -.04em;
    line-height: 1.15;
    margin-top: 24px !important;
}

.hero-description {
    margin-top: 20px !important;
    font-size: 15px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    border-radius: 30px;
    padding: 14px 22px;
    font-size: 14px;
    border: 0;
}

.pill.primary {
    background: var(--mint);
    color: #102b24;
}

.pill:hover {
    filter: brightness(1.12);
}

.text-link {
    font-size: 14px;
}

.hero-sample {
    position: relative;
    padding: 24px 34px 44px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: radial-gradient(ellipse at 85% 20%, #28464d6b, transparent 60%), radial-gradient(#b0d9ea2b .7px, transparent .8px), #121c26;
    background-size: auto, 14px 14px, auto;
}

.sample-caption {
    display: flex;
    justify-content: space-between;
    color: #a2b8c5;
    font-size: 12px;
    gap: 12px;
}

.hero-dialog {
    background: #e8f0ec;
    color: #15382d;
    padding: 28px;
    border-radius: 20px;
    margin: 34px auto 0;
    max-width: 360px;
    transform: rotate(-3deg);
    box-shadow: 0 24px 70px #0005;
}

.hero-dialog-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-symbol {
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid #aebfb7;
    width: 43px;
    height: 43px;
    font-size: 24px;
}

.little-tag {
    font-size: 12px;
    color: #557263;
}

.hero-dialog h2 {
    font-size: 40px;
    letter-spacing: -.06em;
    line-height: 1.05;
    margin-top: 27px;
}

.hero-dialog p {
    color: #668071;
    font-size: 14px;
    margin-top: 16px;
}

.hero-submit {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    margin-top: 28px;
    padding: 14px 16px;
    background: #1d3c32;
    color: #e5fff1;
    border: 0;
    border-radius: 10px;
    font-size: 13px !important;
}

.hero-class-tag {
    position: absolute;
    right: -12px;
    bottom: 29px;
    background: #162a26;
    border: 1px solid #6bdfb052;
    color: #b7f9d8;
    border-radius: 30px;
    padding: 10px 18px;
    font: 12px monospace;
}

.hero-class-tag span {
    color: #6a9886;
    margin-inline: 8px;
}

.recipes-section {
    padding: 36px 0 65px;
    border-top: 1px solid var(--line);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 30px;
}

.section-heading h2, .reference h2 {
    font-size: clamp(32px, 4vw, 52px);
    letter-spacing: -.055em;
    line-height: 1.05;
    margin-top: 15px;
}

.heading-note {
    color: var(--muted);
    font-size: 15px;
}

.rail-buttons {
    display: flex;
    gap: 8px;
}

.rail-buttons button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #d5dfe7;
    background: transparent;
    border: 1px solid var(--line);
}

.rail-buttons button:hover {
    background: #ffffff12;
}

.recipe-rail {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 3px 3px 14px;
    margin: -3px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #344c45 transparent;
}

.recipe {
    flex: 0 0 calc((100% - 48px) / 4);
    min-width: 245px;
    background: #111822;
    padding: 12px 12px 22px;
    color: #eef3f7;
    border: 1px solid var(--line);
    border-radius: 19px;
    text-align: left;
    position: relative;
    scroll-snap-align: start;
    transition: border-color .2s, background .2s;
}

.recipe:hover {
    background: #17232c;
    border-color: #78948b;
}

.recipe.is-selected {
    border-color: var(--mint);
}

.recipe-picture {
    height: 145px;
    border-radius: 10px;
    background: #1c2932;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tiny-window {
    width: 110px;
    padding: 15px;
    border-radius: 8px;
    background: #e7eee9;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 10px 24px #0003;
}

.tiny-window i {
    width: 45%;
    height: 5px;
    background: #426453;
    margin-bottom: 5px;
    border-radius: 2px;
}

.tiny-window b {
    height: 3px;
    background: #bfcec5;
    border-radius: 2px;
}

.tiny-window b:nth-of-type(2) {
    width: 75%;
}

.tiny-window em {
    width: 35px;
    height: 12px;
    background: #5eb58f;
    border-radius: 3px;
    margin-top: 6px;
    align-self: flex-end;
}

.picture-form {
    background: #222c40;
}

.picture-form .tiny-window {
    width: 158px;
}

.picture-form .tiny-window b {
    height: 14px;
    border: 1px solid #becdc5;
    background: transparent;
    width: 100%;
}

.picture-document {
    background: #24382f;
}

.picture-document .tiny-window {
    width: 142px;
    gap: 7px;
    border-radius: 2px;
}

.picture-document .tiny-window b {
    width: 100%;
}

.picture-fullscreen {
    background: #242d38;
    padding: 12px;
}

.picture-fullscreen .tiny-window {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    background: #f0f4f2;
}

.picture-fullscreen .tiny-window em {
    margin-top: auto;
}

.recipe-meta {
    display: flex;
    gap: 12px;
    color: #688576;
    font-size: 12px;
    margin-top: 17px;
}

.recipe-meta > span {
    color: #a6b4be;
}

.recipe strong {
    display: block;
    font-size: 20px;
    letter-spacing: -.035em;
    font-weight: 500;
    margin-top: 8px;
}

.recipe-detail {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
    padding-right: 8px;
}

.recipe-check {
    position: absolute;
    right: 20px;
    top: 176px;
    color: var(--mint);
}

.recipe-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

.builder-section {
    border-top: 1px solid var(--line);
    padding-top: 64px;
    padding-bottom: 74px;
}

.workbench {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    align-items: start;
}

.controls-flow {
    min-width: 0;
}

.control-chapter {
    padding: 38px 0 46px;
    border-bottom: 1px solid var(--line);
}

.control-chapter:first-child {
    padding-top: 18px;
}

.control-chapter:last-child {
    border: 0;
    padding-bottom: 0;
}

.chapter-label {
    color: #a6b9ae;
    font-size: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 13px;
}

.chapter-label > span {
    border: 1px solid #6bdfb040;
    color: var(--mint);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
}

.control-chapter h3 {
    font-size: 29px;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-bottom: 14px;
}

.control-chapter > p {
    font-size: 14px;
    max-width: 400px;
}

.control-chapter fieldset {
    border: 0;
    padding: 0;
    margin: 26px 0 0;
    min-width: 0;
}

.control-chapter legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    float: none;
    width: 100%;
    font-size: 14px;
    gap: 8px;
    margin-bottom: 12px;
}

.control-chapter legend code {
    max-width: 62%;
    text-align: right;
    font-size: 11px;
    color: #789788;
}

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

.choice-grid.sizes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
    border: 1px solid #ffffff19;
    background: #121b25;
    color: #c4cfd9;
    border-radius: 12px;
    padding: 13px 6px 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.choice svg {
    width: 58px;
    height: 38px;
}

.choice > span {
    font-size: 12px;
}

.choice:hover {
    border-color: #7b9b8d;
    background: #17272a;
}

.choice[aria-pressed="true"] {
    border-color: var(--mint);
    color: #a1f0ca;
    background: #18302a;
}

.choice:disabled {
    opacity: .4;
    cursor: default;
}

.field-note {
    color: #91a79a;
    font-size: 12px;
    margin-top: 10px !important;
}

.segmented {
    display: flex;
    background: #121b25;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px;
    gap: 3px;
}

.segmented .choice {
    flex: 1;
    border: 0;
    border-radius: 7px;
    padding: 10px 5px;
    background: transparent;
}

.segmented .choice[aria-pressed="true"] {
    background: #2a4238;
}

.appearance-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 12px;
    scrollbar-width: thin;
    scrollbar-color: #344c45 transparent;
}

.appearance-rail .choice {
    min-width: 135px;
    flex: 1;
    padding: 12px 9px;
}

.appearance-sample {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 68px;
    width: 100%;
    background: #22302e;
    border-radius: 5px;
}

.appearance-sample > i {
    display: block;
    width: 60px;
    height: 40px;
    border: 1px solid #b2bdb5;
    background: #e7efe9;
    border-radius: 7px;
}

.appearance-sample.soft > i {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 8px 16px #0004;
}

.appearance-sample.square > i {
    border-radius: 0;
    box-shadow: none;
}

.class-hint {
    font-size: 12px !important;
    margin-top: 9px !important;
    color: #82968e;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 0;
    cursor: pointer;
    border-bottom: 1px solid var(--line);
}

.switch-row strong {
    display: block;
    font-size: 14px;
    font-weight: 400;
}

.switch-row small {
    color: #819388;
    font: 12px monospace;
}

.switch-row input {
    flex-shrink: 0;
    width: 38px;
    height: 22px;
    appearance: none;
    background: #35424b;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.switch-row input::after {
    content: "";
    background: #c3d1ce;
    width: 16px;
    height: 16px;
    position: absolute;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    transition: transform .18s;
}

.switch-row input:checked {
    background: var(--mint);
}

.switch-row input:checked::after {
    transform: translateX(16px);
    background: #123b2b;
}

.behavior-note {
    color: #99ada2;
    font-size: 14px;
    margin: 24px 0 18px;
}

.sticky-preview {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    min-width: 0;
}

.preview-context {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #c4d6ce;
    font-size: 13px;
}

.live-dot {
    background: var(--mint);
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.preview-context button {
    margin-left: auto;
    padding: 0;
    border: 0;
    color: #91a69b;
    font-size: 12px;
    background: transparent;
}

.scene {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid #446254;
    background: #14221f;
}

.scene-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    padding: 11px 13px;
    background: #152520;
    border-bottom: 1px solid #ffffff15;
}

.scene-tabs {
    display: flex;
    gap: 2px;
}

.scene-toolbar button {
    color: #bdd0c5;
    background: transparent;
    border: 0;
    font-size: 12px;
    border-radius: 7px;
    padding: 7px 10px;
}

.scene-tabs button[aria-pressed="true"] {
    background: #314a3d;
    color: #e2ffed;
}

.scene-toolbar button:hover {
    background: #2b4037;
}

.scene-toolbar .copy-button {
    background: var(--mint);
    color: #163729;
}

.scene-stage {
    height: clamp(340px, 53vh, 480px);
    position: relative;
    overflow: hidden;
    background: radial-gradient(#7c9f9325 .8px, transparent 1px), #162924;
    background-size: 16px 16px, auto;
    isolation: isolate;
}

.scene-background {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fake-browser {
    display: flex;
    gap: 5px;
    align-items: center;
    color: #668678;
    font-size: 11px;
}

.fake-browser i {
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
}

.fake-browser span {
    margin-left: 8px;
}

.scene-empty {
    text-align: center;
    padding-bottom: 12px;
}

.scene-empty p {
    color: #aac3b5;
    font-size: 23px;
    letter-spacing: -.03em;
    margin-bottom: 15px;
}

.scene-empty button {
    background: #d4f3e2;
    color: #173629;
    border: 0;
    border-radius: 30px;
    padding: 11px 18px;
    font-size: 14px;
}

.scene-watermark {
    color: #6d8e7d;
    font-size: 12px;
    text-align: right;
}

.scene-stage .modal {
    display: block;
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 18px;
    z-index: 2;
    background: #05140f55;
}

.scene-stage .modal.no-backdrop {
    background: transparent;
}

.scene-stage .modal-dialog {
    width: 77%;
    max-width: none;
    margin: 0 auto;
    color: #23372c;
}

.scene-stage .modal-dialog.modal-sm {
    width: 62%;
}

.scene-stage .modal-dialog.modal-lg {
    width: 96%;
}

.scene-stage .modal-dialog.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: 100%;
}

.scene-stage .modal-dialog.modal-dialog-scrollable {
    height: 100%;
}

.scene-stage .modal-dialog.modal-fullscreen {
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    margin: -18px;
}

.scene-stage .modal-content {
    background: #edf3ee;
    color: #23372c;
    border-color: #c1cdc5;
    box-shadow: 0 14px 40px #0002;
}

.scene-stage .modal-header {
    padding: 20px 22px 15px;
    border-color: #cfdbd2;
    gap: 12px;
}

.scene-stage .modal-title {
    color: inherit;
    font-size: 23px;
    line-height: 1.13;
    letter-spacing: -.04em;
}

.scene-stage .modal-body {
    padding: 18px 22px;
    font-size: 14px;
    line-height: 1.6;
}

.scene-stage .modal-body p + p {
    margin-top: 15px;
}

.scene-stage .modal-footer {
    padding: 12px 20px;
    border-color: #cfdbd2;
    gap: 6px;
}

.scene-stage .modal-footer .btn {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 7px;
}

.scene-stage .modal-footer .btn-primary {
    background: #245a41;
    border-color: #245a41;
    color: #f0fff5;
}

.scene-stage .modal-footer .btn-outline-secondary {
    color: #4c6557;
    border-color: #bdcbc1;
}

.scene-stage .modal-header button {
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    border: 0;
    color: #668170;
    background: transparent;
}

.scene-stage .form-label {
    display: block;
    font-size: 12px;
    color: #5e7768;
    margin-bottom: 7px;
}

.scene-stage .form-control {
    background: #ffffff8c;
    border: 1px solid #c3d2c7;
    color: #294234;
    font-size: 14px;
    padding: 9px 10px;
    border-radius: 5px;
    width: 100%;
}

.scene-stage .modal-content.is-entering {
    animation: demo-enter .24s ease-out;
}

.scene-code {
    height: clamp(340px, 53vh, 480px);
    margin: 0;
    overflow: auto;
    padding: 22px;
    background: #0e1915;
    tab-size: 2;
    white-space: pre;
}

.scene-code code {
    font: 12px/1.7 ui-monospace, SFMono-Regular, monospace;
    color: #afdcc5;
    overflow-wrap: normal;
}

.scene-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    gap: 8px;
    border-top: 1px solid #ffffff16;
    color: #98b5a4;
    font-size: 12px;
}

.scene-footer button {
    border: 0;
    background: transparent;
    color: #b9e3ce;
    padding: 0;
    font-size: 12px;
}

.selection-summary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 14px;
}

.selection-summary span {
    border: 1px solid #ffffff19;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    color: #a2b7ac;
}

.preview-hint {
    color: #788e82;
    font-size: 12px;
    margin-top: 20px !important;
}

.events-section {
    background: #101a1b;
    border-block: 1px solid var(--line);
    padding: 64px 0;
}

.events-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 28px;
}

.event-log {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    background: #0f171b;
    align-self: start;
}

.event-log-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 20px;
}

.event-log-heading h3 {
    font-size: 21px;
    letter-spacing: -.025em;
}

.event-log-heading button {
    background: transparent;
    border: 0;
    color: #8ca497;
    font-size: 12px;
}

.log-body {
    height: 290px;
    overflow-y: auto;
    padding: 16px;
}

.log-empty {
    color: #83988c;
    font-size: 14px;
    padding: 30px 8px;
}

.log-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 8px;
    border-bottom: 1px solid #ffffff0b;
    padding: 11px 4px;
}

.log-row time {
    font: 11px/1.7 monospace;
    color: #6f897a;
}

.log-row code {
    font-size: 12px;
    color: #a9e0bf;
}

.log-row small {
    display: block;
    color: #7f9789;
    font-size: 12px;
    margin-top: 3px;
}

.log-footnote {
    padding: 18px 20px;
    background: #16221e;
    border-top: 1px solid var(--line);
}

.log-footnote p {
    font-size: 12px;
    margin-top: 10px;
    color: #8ea99b;
}

.reference {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    padding-block: 76px;
}

.reference-intro p {
    margin: 24px 0;
    font-size: 14px;
}

.reference-list details {
    border-top: 1px solid var(--line);
    padding: 20px 0;
}

.reference-list summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    list-style: none;
}

.reference-list summary::-webkit-details-marker {
    display: none;
}

.reference-list summary > span {
    font-size: 12px;
    color: #688372;
}

.reference-list details p {
    font-size: 14px;
    color: var(--muted);
    margin-top: 18px;
}

.reference-list dl {
    margin: 20px 0 0;
}

.reference-list dl div {
    margin-bottom: 14px;
}

.reference-list dt {
    font-weight: 400;
}

.reference-list dd {
    font-size: 13px;
    color: var(--muted);
    margin: 4px 0 0;
}

.prototype-note {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    font-size: 12px;
    color: #768b7f;
}

.page-footer {
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-block: 25px 36px;
    color: #84988c;
    font-size: 12px;
}

.toast {
    position: fixed;
    z-index: 30;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 20px;
    width: max-content;
    max-width: calc(100% - 32px);
    border: 1px solid #679881;
    border-radius: 14px;
    background: #203e30;
    color: #e4ffef;
    box-shadow: 0 8px 40px #0005;
    font-size: 14px;
}

.toast button {
    color: #9bf1c4;
    background: transparent;
    border: 0;
    text-decoration: underline;
    padding: 0;
    margin-left: 15px;
    font-size: 14px;
}

.mobile-result-link {
    display: none;
}

@media (max-width: 820px) {
    .modal-builder-page .mobile-result-link {
        display: block;
        position: fixed;
        z-index: 21;
        right: 18px;
        bottom: 18px;
        padding: 12px 18px;
        background: #b6f3d3;
        color: #18372b;
        border: 1px solid #5aa57d;
        border-radius: 30px;
        font-size: 13px;
        box-shadow: 0 4px 20px #0005;
    }

    .toast {
        bottom: 76px;
    }
}

@keyframes demo-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1100px) {
    .brand span {
        display: none;
    }

    .workbench {
        gap: 30px;
    }

    .hero {
        gap: 36px;
    }

    .hero-sample {
        padding-inline: 24px;
    }

    .choice > span {
        font-size: 11px;
    }

    .scene-stage .modal-dialog.modal-sm {
        width: 75%;
    }
}

@media (max-width: 820px) {
    .wrap {
        width: calc(100% - 36px);
    }

    .page-header {
        padding-inline: 18px;
        height: 70px;
    }

    .page-header nav {
        display: none;
    }

    .hero {
        gap: 25px;
        padding-block: 45px;
    }

    .hero h1 {
        font-size: 84px;
    }

    .hero-dialog {
        padding: 20px;
    }

    .hero-dialog h2 {
        font-size: 31px;
    }

    .hero-dialog p {
        font-size: 12px;
    }

    .sample-caption {
        font-size: 10px;
    }

    .hero-submit {
        font-size: 11px !important;
    }

    .workbench {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .sticky-preview {
        position: static;
        order: -1;
        width: 100%;
    }

    .controls-flow {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: start;
    }

    .control-chapter, .control-chapter:first-child {
        padding-top: 20px;
    }

    .scene-stage, .scene-code {
        height: 420px;
    }

    .preview-hint {
        display: none;
    }

    .events-layout {
        grid-template-columns: 1fr;
    }

    .log-body {
        height: 200px;
    }

    .reference {
        gap: 30px;
    }

    .heading-note {
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .hero-copy {
        position: relative;
    }

    .hero h1 {
        font-size: 94px;
    }

    .hero-lead {
        font-size: 30px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-sample {
        max-width: 460px;
        width: 100%;
        padding-bottom: 38px;
    }

    .hero-dialog {
        max-width: 260px;
        padding: 24px;
        margin-top: 24px;
    }

    .hero-dialog h2 {
        font-size: 34px;
    }

    .hero-class-tag {
        right: -4px;
        bottom: 23px;
    }

    .section-heading {
        align-items: start;
    }

    .section-heading h2, .reference h2 {
        font-size: 35px;
    }

    .heading-note {
        display: none;
    }

    .rail-buttons {
        margin-top: 25px;
    }

    .recipe {
        min-width: 250px;
    }

    .recipe-footer {
        flex-direction: column;
        gap: 8px;
    }

    .builder-section {
        padding-top: 42px;
    }

    .controls-flow {
        display: block;
    }

    .control-chapter {
        padding-block: 30px;
    }

    .choice > span {
        font-size: 12px;
    }

    .scene-stage, .scene-code {
        height: 380px;
    }

    .scene-background {
        padding: 22px;
    }

    .scene-stage .modal {
        padding: 12px;
    }

    .scene-stage .modal-dialog {
        width: 91%;
    }

    .scene-stage .modal-dialog.modal-sm {
        width: 82%;
    }

    .scene-stage .modal-dialog.modal-fullscreen {
        width: calc(100% + 24px);
        height: calc(100% + 24px);
        margin: -12px;
    }

    .scene-stage .modal-header {
        padding: 17px 16px 12px;
    }

    .scene-stage .modal-title {
        font-size: 21px;
    }

    .scene-stage .modal-body {
        padding: 14px 16px;
        font-size: 13px;
    }

    .scene-stage .modal-footer {
        padding: 10px 12px;
    }

    .scene-toolbar {
        padding: 9px;
    }

    .scene-toolbar button {
        font-size: 12px;
        padding: 7px 9px;
    }

    .events-section {
        padding-block: 44px;
    }

    .reference {
        grid-template-columns: 1fr;
        padding-block: 48px;
    }

    .page-footer {
        flex-wrap: wrap;
    }

    .page-footer > span {
        width: 100%;
    }

    .version-link {
        font-size: 11px;
        padding-inline: 11px;
    }

    .brand img {
        width: 130px;
    }
}

@media (min-width: 1101px) and (max-width: 1350px) {
    .hero-sample {
        padding-inline: 22px;
    }

    .hero-dialog {
        padding: 24px;
    }

    .hero-dialog h2 {
        font-size: 34px;
    }

    .hero-submit {
        font-size: 12px !important;
        padding-inline: 12px;
    }

    .hero-actions {
        gap: 16px;
    }

    .hero-description {
        font-size: 14px;
    }

    .scene-stage .modal-dialog.modal-sm {
        width: 75%;
    }

    .heading-note {
        font-size: 13px;
    }

    .section-heading h2 {
        font-size: 42px;
    }

    .choice > span {
        font-size: 11px;
    }
}

@media (min-width: 821px) {
    .sticky-preview .scene-stage, .sticky-preview .scene-code {
        height: clamp(280px, calc(100dvh - 340px), 460px);
    }
}

@media (min-width: 821px) and (max-height: 760px) {
    .sticky-preview .preview-hint {
        display: none;
    }
}

@media (max-width: 1100px) {
    .page-content {
        margin-left: 0;
    }

    .page-header {
        padding-inline: 24px;
        gap: 18px;
    }

    .brand {
        flex-basis: auto;
        padding: 0;
        border: 0;
    }

    .page-header nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        background: #ffffff05;
        border: 1px solid var(--line);
        border-radius: 9px;
        color: #cbd8e2;
        font-size: 13px !important;
    }

    .docs-sidebar {
        top: 0;
        width: min(320px, calc(100% - 36px));
        transform: translateX(-100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform .2s ease, visibility .2s;
        box-shadow: 16px 0 60px #0003;
    }

    .menu-is-open {
        overflow: hidden;
    }

    .menu-is-open .docs-sidebar {
        transform: none;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar-top {
        padding-top: 22px;
    }

    .sidebar-heading {
        color: #dce6ee;
        font-size: 15px;
        min-height: 32px;
        margin-bottom: 16px;
    }

    .menu-close {
        display: grid;
        place-items: center;
        background: #ffffff08;
        border: 1px solid var(--line);
        border-radius: 8px;
        width: 30px;
        height: 30px;
        color: #aec2b6;
        font-size: 22px !important;
        line-height: 1;
    }

    .nav-group a, .nav-section > summary {
        min-height: 38px;
    }

    .nav-page-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 6px 0 9px;
    }

    .nav-page-links a {
        font-size: 12px;
        min-height: 30px;
        color: #729688;
    }

    .docs-sidebar.is-searching .nav-page-links {
        display: none;
    }
}

@media (max-width: 820px) {
    body.modal-builder-page {
        --header-height: 70px;
    }

    .page-header {
        gap: 12px;
        padding-inline: 18px;
    }
}

@media (max-width: 560px) {
    .version-link {
        display: none;
    }

    .menu-toggle {
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .modal-builder-page *, .modal-builder-page *::before, .modal-builder-page *::after {
        animation: none !important;
        transition: none !important;
    }
}