body {
    background: #050505;
    color: #fafafa
}

.builder-header {
    max-width: 1280px;
    margin: auto;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #252525
}

.builder-header>a:last-child {
    font-size: 13px;
    color: #aaa
}

.builder-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    letter-spacing: .1em
}

.builder-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain
}

.builder-wrap {
    max-width: 1280px;
    padding: 58px 28px 90px;
    margin: auto
}

.builder-eyebrow {
    font-size: 11px;
    letter-spacing: .15em;
    color: var(--blue);
    font-weight: 750
}

.builder-wrap h1 {
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1.1;
    letter-spacing: -.05em;
    margin: 15px 0
}

.builder-intro {
    max-width: 760px;
    color: #b5b5b5;
    margin-bottom: 44px
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(290px, 420px) minmax(0, 1fr);
    gap: 24px;
    align-items: start
}

.builder-panel,
.builder-preview {
    background: #111;
    border: 1px solid #2b2b2b;
    border-radius: 20px;
    padding: 26px;
    min-width: 0
}

.builder-panel h2,
.builder-preview h2,
.builder-help h2 {
    font-size: 19px;
    margin: 0 0 24px;
    letter-spacing: -.025em
}

.builder-panel label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    margin: 20px 0 8px
}

.builder-panel input,
.builder-panel select,
.builder-panel textarea {
    background: #1c1c1c;
    color: white;
    border: 1px solid #414141;
    border-radius: 9px;
    padding: 12px;
    font: inherit;
    width: 100%;
    font-size: 14px
}

.builder-panel input:focus,
.builder-panel select:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px
}

.search-row {
    display: flex;
    gap: 8px
}

.search-row input {
    min-width: 0;
    flex: 1
}

.search-row button,
.copy-button {
    border: 0;
    border-radius: 9px;
    padding: 11px 15px;
    background: #fff;
    color: #111;
    font-weight: 700;
    cursor: pointer
}

.search-row button:disabled {
    opacity: .6;
    cursor: wait
}

.field-hint,
.preview-note,
.code-section p {
    font-size: 12px;
    color: #999;
    line-height: 1.6
}

.selected-place {
    font-size: 12px;
    color: #83d7aa;
    margin: 10px 0
}

.location-results {
    display: grid;
    gap: 4px
}

.location-results button {
    background: #202020;
    color: #fff;
    border: 1px solid #333;
    text-align: left;
    padding: 10px;
    border-radius: 7px;
    cursor: pointer
}

.location-results button:hover {
    border-color: var(--blue)
}

.field-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 10px
}

.unit-switch {
    display: flex;
    gap: 3px;
    background: #222;
    padding: 3px;
    border-radius: 8px
}

.unit-switch button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #bbb;
    padding: 5px 10px;
    cursor: pointer
}

.unit-switch button[aria-pressed=true] {
    background: #444;
    color: white
}

.code-section {
    margin-top: 35px;
    padding-top: 26px;
    border-top: 1px solid #333
}

.code-section h2 {
    margin-bottom: 8px
}

.code-section textarea {
    resize: vertical;
    min-height: 145px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 11px;
    line-height: 1.55
}

.copy-button {
    margin-top: 12px;
    width: 100%
}

#copy-status,
#search-status {
    font-size: 12px;
    color: #9cd5e7
}

.preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

.preview-head h2 {
    margin-bottom: 18px
}

.preview-head span {
    font-size: 11px;
    color: #999
}

.preview-shell {
    background: #080808;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden
}

.preview-shell iframe {
    display: block;
    border: 0;
    width: 100%;
    height: 690px;
    background: transparent
}

.builder-preview .preview-shell {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.builder-preview .preview-shell--transparent {
    background: transparent;
}

.builder-preview .preview-shell iframe {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
}

.builder-help {
    padding: 35px 0;
    color: #bbb
}

.builder-help h2 {
    color: white;
    margin-bottom: 12px
}

.builder-footer {
    text-align: center;
    padding: 25px;
    border-top: 1px solid #292929;
    color: #999;
    font-size: 12px
}

.builder-footer a {
    color: white;
    font-weight: 700
}

@media(max-width:900px) {
    .builder-layout {
        grid-template-columns: 1fr
    }

    .builder-wrap {
        padding: 35px 18px
    }

    .builder-panel,
    .builder-preview {
        padding: 18px
    }

    .builder-header {
        padding: 18px
    }

    .preview-shell iframe {
        height: 600px
    }
}

.search-row button:hover:not(:disabled),
.copy-button:hover {
    background: #e8e8e8
}

.search-row button:focus-visible,
.copy-button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px
}

/* Reuse the homepage .wordmark styles from ../styles.css. */
.builder-header {
    max-width: var(--max);
    height: 78px;
    padding: 0 32px
}

@media(max-width:900px) {
    .builder-header {
        height: 68px;
        padding: 0 20px
    }
}
/* ROR-WEB-3CB: Keep Feed Builder navigation visible like the homepage. */
.builder-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(5, 5, 5, .84);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}
