.mq-embed-body {
    --mq-bg: #f7f7ff;
    --mq-panel: #fff;
    --mq-text: #232040;
    --mq-muted: #565372;
    --mq-border: #d7d4e8;
    --mq-accent: #5037b5;
    --mq-on-accent: #fff;
    margin: 0;
    background: var(--mq-bg);
    color: var(--mq-text);
    font: 16px/1.55 system-ui, sans-serif;
}

[data-embed-theme="dark"] .mq-embed-body {
    color-scheme: dark;
    --mq-bg: #171628;
    --mq-panel: #222137;
    --mq-text: #f7f4ff;
    --mq-muted: #d1cbe8;
    --mq-border: #555070;
    --mq-accent: #c8b7ff;
    --mq-on-accent: #201642;
}

#mq-embed-frame {
    box-sizing: border-box;
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(14px, 4vw, 36px);
    overflow-wrap: anywhere;
}

.mq-embed-heading {
    padding: 2px 0 15px;
    border-bottom: 1px solid var(--mq-border);
}

.mq-embed-heading > span {
    color: var(--mq-accent);
    font-size: .85rem;
    font-weight: 750;
}

.mq-embed-heading h1 {
    margin: 6px 0 0;
    font-size: clamp(1.35rem, 3.9vw, 2rem);
    line-height: 1.18;
}

#mq-embed-frame .myquiz-core {
    padding: clamp(12px, 3vw, 24px);
    margin: 16px 0;
    border: 1px solid var(--mq-border);
    border-radius: 14px;
    background: var(--mq-panel);
    color: var(--mq-text);
}

#mq-embed-frame .myquiz-core img,
#mq-embed-frame .myquiz-core svg,
#mq-embed-frame .myquiz-core canvas {
    max-width: 100%;
}

#mq-embed-frame .myquiz-core button {
    border: 1px solid var(--mq-border);
    border-radius: 8px;
    background: var(--mq-panel);
    color: var(--mq-text);
    min-height: 44px;
    padding: 8px 14px;
    font: inherit;
    cursor: pointer;
    white-space: normal;
}

#mq-embed-frame .myquiz-core .mq4-next,
#mq-embed-frame .myquiz-core > button {
    background: var(--mq-accent);
    border-color: var(--mq-accent);
    color: var(--mq-on-accent);
    font-weight: 700;
}

#mq-embed-frame .quiz-question {
    font-weight: 650;
    margin-bottom: 12px;
}

#mq-embed-frame .quiz-answers {
    display: grid;
    gap: 8px;
}

#mq-embed-frame .quiz-back,
#mq-embed-frame .quiz-restart {
    margin-top: 12px;
}

#mq-embed-frame .myquiz-status {
    margin: 8px 0 0;
    color: var(--mq-muted);
}

#mq-embed-frame .myquiz-status:empty {
    display: none;
}

#mq-embed-frame .mq4-result {
    background: var(--mq-panel);
    color: var(--mq-text);
}

#mq-embed-frame .mq4-question {
    min-inline-size: 0;
    border-color: var(--mq-border);
}

.mq-embed-source {
    padding: 10px 0 2px;
    text-align: center;
}

.mq-embed-source a {
    color: var(--mq-accent);
    font-weight: 650;
    text-underline-offset: .2em;
}

#mq-embed-frame :focus-visible {
    outline: 2px solid var(--mq-accent);
    outline-offset: 3px;
}

.mq-embed-generator {
    margin-block: 36px;
    padding: clamp(12px,3vw,24px);
    border: 1px solid #d7d4e8;
    border-radius: 12px;
}

.mq-embed-generator .mq-embed-fields {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr));
    margin-block: 14px;
}

.mq-embed-generator :is(input:not([type="checkbox"]),select,textarea) {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.mq-embed-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
