.questeed-wrap {
    --qstd-primary: #c7974a;
    --qstd-accent: #7b2d26;
    --qstd-bg: #15100c;
    --qstd-card: #2b2018;
    --qstd-text: #f6ead7;
    --qstd-muted: #d9c6aa;
    color: var(--qstd-text);
    background:
        radial-gradient(circle at top, rgba(199, 151, 74, 0.17), transparent 34rem),
        linear-gradient(145deg, rgba(21, 16, 12, 0.96), rgba(43, 32, 24, 0.96));
    border: 1px solid rgba(199, 151, 74, 0.35);
    border-radius: 24px;
    padding: clamp(1.25rem, 3vw, 3rem);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
    max-width: 1120px;
    margin: 2rem auto;
    font-family: Georgia, 'Times New Roman', serif;
}

.questeed-wrap * {
    box-sizing: border-box;
}

.questeed-hero {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 2rem;
}

.questeed-logo {
    display: block;
    max-width: min(340px, 90%);
    max-height: 180px;
    object-fit: contain;
    margin: 0 auto 1rem;
}

.questeed-kicker {
    color: var(--qstd-primary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.questeed-wrap h1,
.questeed-wrap h2,
.questeed-wrap h3 {
    color: var(--qstd-text);
    line-height: 1.1;
    margin-top: 0;
}

.questeed-hero h1,
.questeed-scene h1 {
    font-size: clamp(2.35rem, 7vw, 5rem);
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.questeed-tagline {
    color: var(--qstd-primary);
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    font-weight: 700;
    margin: 0 0 1rem;
}

.questeed-intro,
.questeed-description,
.questeed-scene-body,
.questeed-contact-callout p,
.questeed-how span {
    color: var(--qstd-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.questeed-how {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.questeed-how div,
.questeed-card,
.questeed-scene,
.questeed-contact-callout {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        var(--qstd-card);
    border: 1px solid rgba(199, 151, 74, 0.28);
    border-radius: 20px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 14px 30px rgba(0, 0, 0, 0.25);
}

.questeed-how div {
    padding: 1rem;
}

.questeed-how strong {
    color: var(--qstd-primary);
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.questeed-story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.questeed-card {
    overflow: hidden;
}

.questeed-cover,
.questeed-scene-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.questeed-cover {
    aspect-ratio: 16 / 9;
}

.questeed-card-body {
    padding: 1.25rem;
}

.questeed-card h2 {
    font-size: 1.7rem;
    margin-bottom: 0.65rem;
}

.questeed-button,
.questeed-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.78rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, var(--qstd-primary), #f2c779);
    color: #20130c !important;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.questeed-button:hover,
.questeed-choice:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.questeed-reader {
    max-width: 900px;
}

.questeed-scene {
    padding: clamp(1.2rem, 4vw, 3rem);
}

.questeed-scene-image {
    border-radius: 18px;
    margin: 1rem 0 1.5rem;
    max-height: 520px;
}

.questeed-scene-body {
    font-size: clamp(1.08rem, 2vw, 1.25rem);
}

.questeed-choices {
    display: grid;
    gap: 0.85rem;
    margin-top: 2rem;
}

.questeed-choice {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    border-radius: 14px;
    padding: 1rem 1.15rem;
}

.questeed-choice::before {
    content: '➤';
    opacity: 0.7;
}

.questeed-ending-actions {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(199, 151, 74, 0.25);
}

.questeed-ending-label {
    color: var(--qstd-primary);
    font-weight: 700;
}

.questeed-reader-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(199, 151, 74, 0.22);
}

.questeed-reader-footer a {
    color: var(--qstd-primary) !important;
    font-weight: 700;
}

.questeed-contact-callout {
    margin-top: 2rem;
    padding: clamp(1rem, 3vw, 2rem);
}

.questeed-contact-form {
    display: grid;
    gap: 1rem;
}

.questeed-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.questeed-contact-form label {
    color: var(--qstd-text);
    display: grid;
    gap: 0.35rem;
    font-weight: 700;
}

.questeed-contact-form input,
.questeed-contact-form textarea {
    width: 100%;
    border: 1px solid rgba(199, 151, 74, 0.35);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--qstd-text);
    padding: 0.85rem;
    font-family: inherit;
}

.questeed-contact-form textarea {
    resize: vertical;
}

.questeed-hp {
    display: none !important;
}

.questeed-success,
.questeed-error {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 700;
}

.questeed-success {
    background: rgba(46, 125, 50, 0.18);
    border: 1px solid rgba(129, 199, 132, 0.45);
    color: #d8ffd9;
}

.questeed-error {
    background: rgba(123, 45, 38, 0.25);
    border: 1px solid rgba(255, 170, 150, 0.45);
    color: #ffe3dc;
}

@media (max-width: 760px) {
    .questeed-wrap {
        border-radius: 16px;
        margin: 1rem auto;
    }

    .questeed-how,
    .questeed-form-row {
        grid-template-columns: 1fr;
    }

    .questeed-story-grid {
        grid-template-columns: 1fr;
    }

    .questeed-choice,
    .questeed-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .questeed-choice::before {
        content: '';
    }
}

/* Questeed story ads */
.questeed-ad-zone {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--qstd-primary) 45%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--qstd-card) 82%, #000 18%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.questeed-ad-label {
    display: inline-block;
    margin-bottom: .65rem;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--qstd-muted);
    opacity: .82;
}

.questeed-ad-output:empty {
    display: none;
}

.questeed-ad-output img,
.questeed-ad-output iframe {
    max-width: 100%;
}

.questeed-ad-location {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: var(--qstd-muted);
    font-size: .9rem;
}

.questeed-ad-location[hidden] {
    display: none;
}

.questeed-ad-location-button {
    border: 0;
    border-radius: 999px;
    padding: .45rem .85rem;
    background: var(--qstd-primary);
    color: #17100b;
    font-weight: 700;
    cursor: pointer;
}

.questeed-ad-location-button:disabled {
    opacity: .55;
    cursor: wait;
}

@media (max-width: 700px) {
    .questeed-ad-location {
        align-items: stretch;
        flex-direction: column;
    }
}
