#store-advisor-addon-root,
.tsa-launcher {
    --tsa-ink: #271a12;
    --tsa-muted: #74695c;
    --tsa-gold: #d4af37;
    --tsa-paper: #fffdf8;
    font-family: inherit;
}

.tsa-launcher {
    position: fixed;
    z-index: 390;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    display: none;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(212, 175, 55, .8);
    background: #4a2d18;
    padding: 13px 18px;
    color: #fff1c8;
    box-shadow: 0 10px 32px rgba(35, 22, 12, .28);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.tsa-launcher--fallback {
    display: inline-flex;
}

.tsa-nav-launcher {
    display: inline-flex;
    min-height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(212, 175, 55, .7);
    background: rgba(118, 80, 39, .7);
    padding: 4px 8px;
    color: #fff1c8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease;
}

.tsa-nav-launcher::before {
    content: "✦";
    font-size: 13px;
}

.tsa-nav-launcher:hover {
    background: #8d6332;
}

.tsa-launcher::before {
    content: "✦";
    color: #e6c46e;
    font-size: 17px;
}

.tsa-launcher:hover {
    background: #654326;
    transform: translateY(-2px);
}

.tsa-launcher:focus-visible,
#store-advisor-addon-root button:focus-visible,
#store-advisor-addon-root a:focus-visible,
#store-advisor-addon-root input:focus-visible,
#store-advisor-addon-root textarea:focus-visible {
    outline: 3px solid #e6c46e;
    outline-offset: 3px;
}

.tsa-backdrop {
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 18px;
    background: rgba(15, 11, 8, .76);
    backdrop-filter: blur(5px);
}

.tsa-dialog {
    position: relative;
    width: min(100%, 900px);
    max-height: min(92dvh, 960px);
    overflow: auto;
    border: 1px solid rgba(212, 175, 55, .5);
    background: var(--tsa-paper);
    color: var(--tsa-ink);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.tsa-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .85fr);
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: #21130d;
    color: #f1dfb6;
}

.tsa-hero-copy {
    position: relative;
    z-index: 1;
}

.tsa-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #e6c46e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.tsa-eyebrow span {
    margin-right: 5px;
    font-size: 16px;
}

.tsa-hero h2,
.tsa-settings-header h2 {
    margin: 0;
    font: 700 clamp(23px, 3vw, 34px)/1.15 Georgia, "Times New Roman", serif;
    letter-spacing: -.02em;
}

.tsa-hero-copy p {
    max-width: 520px;
    margin: 12px 0 0;
    color: #d6c5a5;
    font-size: 14px;
    line-height: 1.65;
}

.tsa-terrain-art {
    display: block;
    width: 100%;
    height: 145px;
    border: 1px solid rgba(212, 175, 55, .3);
    border-radius: 4px;
}

.tsa-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    background: transparent;
    color: #d6c5a5;
    font: 300 30px/1 Arial, sans-serif;
    cursor: pointer;
}

.tsa-close:hover {
    background: rgba(255, 255, 255, .1);
    color: white;
}

.tsa-content {
    padding: 26px 32px 30px;
}

.tsa-form > label,
.tsa-budget legend {
    display: block;
    margin-bottom: 8px;
    color: var(--tsa-ink);
    font-size: 14px;
    font-weight: 750;
}

.tsa-form textarea,
.tsa-budget input {
    width: 100%;
    border: 1px solid #d8d0c3;
    border-radius: 3px;
    background: white;
    padding: 11px 12px;
    color: #2b2118;
    font: inherit;
}

.tsa-form textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.tsa-form textarea::placeholder,
.tsa-budget input::placeholder {
    color: #988e81;
}

.tsa-examples,
.tsa-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tsa-examples button,
.tsa-budget-chip {
    border: 1px solid #ddd2bc;
    border-radius: 999px;
    background: #fbf8f1;
    padding: 7px 11px;
    color: #604728;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}

.tsa-examples button:hover,
.tsa-budget-chip:hover {
    border-color: #b99052;
    background: #f5eedf;
}

.tsa-budget {
    margin: 22px 0 0;
    padding: 0;
    border: 0;
}

.tsa-budget legend {
    margin-bottom: 10px;
}

.tsa-budget legend span {
    color: var(--tsa-muted);
    font-size: 12px;
    font-weight: 400;
}

.tsa-budget-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tsa-budget-fields label {
    color: var(--tsa-muted);
    font-size: 12px;
    font-weight: 650;
}

.tsa-budget-fields input {
    display: block;
    margin-top: 6px;
}

.tsa-suggestion-note,
.tsa-suggestion-error,
.tsa-product-note,
.tsa-privacy {
    color: var(--tsa-muted);
    font-size: 11px;
    line-height: 1.5;
}

.tsa-suggestion-error {
    color: #8e3d2c;
}

.tsa-submit {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 17px;
    border: 1px solid #7d542d;
    background: #765027;
    padding: 13px 16px;
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
    cursor: pointer;
}

.tsa-submit:hover:not(:disabled) {
    background: #5e3d20;
}

.tsa-submit:disabled {
    cursor: wait;
    opacity: .7;
}

.tsa-privacy {
    margin: 10px 0 0;
    text-align: center;
}

.tsa-message {
    margin: 12px 0 0;
    border-left: 3px solid #a93c2b;
    background: #fff1ed;
    padding: 10px 12px;
    color: #792d20;
    font-size: 13px;
    line-height: 1.5;
}

.tsa-message--success {
    border-color: #28774d;
    background: #eff8f2;
    color: #205a3a;
}

.tsa-results {
    margin-top: 26px;
    border-top: 1px solid #e7dfd2;
    padding-top: 22px;
}

.tsa-results[hidden] {
    display: none;
}

.tsa-results-title {
    margin: 0;
    color: var(--tsa-ink);
    font: 700 22px/1.2 Georgia, "Times New Roman", serif;
}

.tsa-results-summary {
    margin: 9px 0 16px;
    color: #514638;
    font-size: 14px;
    line-height: 1.6;
}

.tsa-product {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    margin-top: 12px;
    border: 1px solid #e5ddcf;
    background: #fff;
    padding: 14px;
}

.tsa-product-image {
    width: 110px;
    height: 110px;
    object-fit: cover;
    background: #f4f0e9;
}

.tsa-product-details h4 {
    margin: 0;
    color: #302316;
    font-size: 15px;
    font-weight: 750;
}

.tsa-product-reason {
    margin: 6px 0;
    color: #625746;
    font-size: 13px;
    line-height: 1.5;
}

.tsa-product-price {
    margin: 8px 0 0;
    color: #61431e;
    font-size: 13px;
    font-weight: 800;
}

.tsa-product-note {
    margin: 5px 0 0;
}

.tsa-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 10px;
}

.tsa-product-actions a,
.tsa-product-actions button,
.tsa-terrain-link {
    border: 0;
    background: none;
    padding: 0;
    color: #6a4428;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.tsa-product-actions a:hover,
.tsa-product-actions button:hover,
.tsa-terrain-link:hover {
    color: #9a6a2f;
}

.tsa-terrain-link--standalone {
    display: inline-flex;
    margin: 8px 0;
}

.tsa-settings {
    max-width: 660px;
}

.tsa-settings-header {
    position: relative;
    padding: 28px 60px 24px 28px;
    background: #21130d;
    color: #f1dfb6;
}

.tsa-settings-header h2 {
    font-size: 26px;
}

.tsa-settings-body {
    padding: 26px 28px;
}

.tsa-settings-body > p {
    margin: 0 0 18px;
    color: #514638;
    font-size: 14px;
    line-height: 1.65;
}

.tsa-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #e1d8c8;
    background: #faf8f3;
    padding: 16px;
    cursor: pointer;
}

.tsa-toggle input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: #765027;
}

.tsa-toggle strong,
.tsa-toggle small {
    display: block;
}

.tsa-toggle strong {
    color: #302316;
    font-size: 13px;
}

.tsa-toggle small {
    margin-top: 6px;
    color: var(--tsa-muted);
    font-size: 12px;
    line-height: 1.5;
}

.tsa-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid #e7dfd2;
    padding-top: 16px;
}

.tsa-settings-actions button {
    min-height: 40px;
    border: 1px solid #d8d0c3;
    background: white;
    padding: 8px 16px;
    color: #4c4031;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
}

.tsa-settings-actions .tsa-save {
    width: auto;
    margin: 0;
    border-color: #765027;
    background: #765027;
    color: white;
}

.tsa-settings-actions button:disabled {
    cursor: wait;
    opacity: .65;
}

.tsa-content {
    padding: 20px;
}

.tsa-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tsa-question > label {
    display: block;
    margin-bottom: 6px;
    color: #44403c;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tsa-form textarea,
.tsa-budget input {
    box-sizing: border-box;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
}

.tsa-form textarea {
    min-height: 84px;
}

.tsa-form-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    color: #78716c;
    font-size: 11px;
}

.tsa-prompt-examples {
    margin-top: 12px;
}

.tsa-prompt-examples > p {
    margin: 0 0 8px;
    color: #78716c;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.tsa-examples {
    margin-top: 0;
}

.tsa-examples button {
    border-color: rgba(212, 175, 55, .5);
    background: #fffaf0;
    padding: 6px 12px;
    color: #44403c;
    font-size: 12px;
    text-align: left;
}

.tsa-budget {
    margin: 0;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    background: rgba(250, 250, 249, .7);
    padding: 12px 16px 16px;
}

.tsa-budget legend {
    margin-bottom: 8px;
    padding: 0 4px;
    color: #44403c;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tsa-budget-description {
    margin: 0 0 10px;
    color: #57534e;
    font-size: 12px;
}

.tsa-budget-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tsa-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.tsa-budget-chip {
    border-color: #d6d3d1;
    background: #fff;
    padding: 6px 12px;
    color: #44403c;
    font-size: 12px;
    font-weight: 650;
}

.tsa-budget-chip[aria-pressed="true"],
.tsa-budget-chip--selected {
    border-color: #765027;
    background: #765027;
    color: #fff;
}

.tsa-budget-chip[aria-pressed="true"]:hover,
.tsa-budget-chip--selected:hover {
    border-color: #5e3d20;
    background: #5e3d20;
}

.tsa-budget-details {
    margin-top: 12px;
}

.tsa-budget-details summary {
    width: fit-content;
    color: #765027;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.tsa-budget-details[open] .tsa-budget-fields {
    margin-top: 12px;
}

.tsa-budget-fields label {
    color: #44403c;
    font-size: 12px;
    font-weight: 650;
}

.tsa-suggestion-note,
.tsa-suggestion-error {
    font-size: 12px;
}

.tsa-loading-status {
    margin: -8px 0 0;
    color: #57534e;
    font-size: 12px;
}

.tsa-submit {
    width: auto;
    min-height: 44px;
    align-self: flex-start;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.tsa-submit:disabled {
    cursor: not-allowed;
    opacity: .55;
}

#store-advisor-addon-root[data-busy="true"] .tsa-submit:disabled {
    cursor: wait;
}

.tsa-results {
    display: grid;
    gap: 16px;
    margin-top: 0;
    border-top: 1px solid #e7e5e4;
    padding-top: 20px;
}

.tsa-results-intro {
    display: flex;
    gap: 12px;
    border: 1px solid rgba(212, 175, 55, .35);
    border-radius: 8px;
    background: #faf5e8;
    padding: 16px;
}

.tsa-results-sparkle {
    flex: 0 0 auto;
    color: #9b7134;
    font-size: 19px;
    line-height: 1.2;
}

.tsa-results-title {
    font-size: 14px;
}

.tsa-results-summary {
    margin: 4px 0 0;
    color: #44403c;
    font-size: 14px;
}

.tsa-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tsa-product {
    display: flex;
    min-width: 0;
    gap: 12px;
    margin-top: 0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    transition: box-shadow .2s ease;
}

.tsa-product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.tsa-product-image {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    border-radius: 6px;
}

.tsa-product-placeholder {
    display: grid;
    place-items: center;
    background: #2b1b10;
    color: #e6c46e;
    font-size: 25px;
}

.tsa-product-details {
    min-width: 0;
    flex: 1;
}

.tsa-product-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px 8px;
}

.tsa-product-details h4 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
}

.tsa-product-price {
    margin: 0;
    color: #166534;
    font-size: 13px;
    font-weight: 750;
}

.tsa-product-description,
.tsa-product-reason {
    margin: 5px 0 0;
    color: #57534e;
    font-size: 12px;
    line-height: 1.5;
}

.tsa-product-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tsa-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tsa-product-badge {
    border-radius: 999px;
    background: #f5f5f4;
    padding: 4px 8px;
    color: #44403c;
    font-size: 10px;
    font-weight: 650;
}

.tsa-product-badge--terrain {
    background: #fffbeb;
    color: #78350f;
}

.tsa-budget-status {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 650;
}

.tsa-budget-status--match {
    color: #15803d;
}

.tsa-budget-status--outside {
    color: #b45309;
}

.tsa-product-actions {
    margin-top: 8px;
}

.tsa-product-actions .tsa-product-link {
    color: #765027;
    font-size: 12px;
}

.tsa-contact-callout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(212, 175, 55, .35);
    border-radius: 4px;
    background: #faf5e8;
    padding: 16px;
}

.tsa-contact-callout p {
    margin: 0;
    color: #44403c;
    font-size: 12px;
    line-height: 1.6;
}

.tsa-contact-callout a {
    flex: 0 0 auto;
    color: #765027;
    font-size: 12px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tsa-results-note {
    margin: 0;
    color: #78716c;
    font-size: 11px;
    line-height: 1.5;
}

.tsa-terrain-link--standalone {
    margin: 0;
    text-decoration: none;
}

@media (max-width: 640px) {
    .tsa-launcher {
        display: inline-flex;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        padding: 11px 13px;
        font-size: 10px;
    }

    .tsa-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .tsa-dialog {
        width: 100%;
        max-height: 94dvh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
    }

    .tsa-hero {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 25px 20px 19px;
    }

    .tsa-hero-copy p {
        max-width: 100%;
        font-size: 13px;
    }

    .tsa-terrain-art {
        height: 104px;
    }

    .tsa-content {
        padding: 20px;
    }

    .tsa-product-grid {
        grid-template-columns: 1fr;
    }

    .tsa-product {
        gap: 10px;
        padding: 10px;
    }

    .tsa-product-image {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .tsa-contact-callout {
        padding: 12px;
    }

    .tsa-settings-header {
        padding: 25px 54px 20px 20px;
    }

    .tsa-settings-body {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tsa-launcher {
        transition: none;
    }
}
