.sb-adventure {
    --sb-adventure-ink: #493451;
    --sb-adventure-accent: #703c81;
    --sb-adventure-line: #ead9ef;
    color: var(--sb-adventure-ink);
    width: min(100%, 990px);
    margin-block: 1.2rem 2rem;
}
.sb-adventure *, .sb-adventure *::before { box-sizing: border-box; }
.sb-adventure :is(h2, h3) { margin-top: 0; line-height: 1.45; }
.sb-adventure :is(p, li) { line-height: 1.85; }
.sb-adventure :is(a, button, input, summary):focus-visible { outline: 2px solid #8f459f; outline-offset: 3px; }
.sb-adventure-hero, .sb-adventure-card {
    border: 1px solid var(--sb-adventure-line);
    border-radius: 1.4rem;
    padding: clamp(1rem, 3vw, 1.65rem);
    margin-block: .9rem;
    background: #fdf7ff;
}
.sb-adventure-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: clamp(.9rem, 3vw, 1.6rem);
    align-items: center;
    background: linear-gradient(140deg, #fff3f6, #f4e9ff);
}
.sb-adventure-hero img, .sb-adventure-clue {
    display: block; width: 100%; height: auto; border-radius: .95rem;
}
.sb-adventure-clue { max-width: 220px; }
.sb-adventure-card { scroll-margin-top: 5rem; }
.sb-adventure-card fieldset {
    margin: 0 0 1.05rem;
    padding: .85rem;
    border: 1px solid var(--sb-adventure-line);
    border-radius: .85rem;
    background: #fff;
}
.sb-adventure-card legend { padding-inline: .4rem; font-weight: 750; }
.sb-adventure-card input[name="math"] {
    display: block; margin-top: .55rem; padding: .45rem .6rem;
    width: min(100%, 10rem); min-height: 44px; border: 1px solid #b78ac4;
    border-radius: .55rem; font: inherit;
}
.sb-adventure-choices { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.sb-adventure-choices label {
    display: inline-flex; gap: .35rem; align-items: center; min-height: 44px; cursor: pointer;
    background: #f7ecfa; border: 1px solid var(--sb-adventure-line); border-radius: .6rem; padding: .35rem .75rem;
}
.sb-adventure :is(.sb-adventure-button, .sb-adventure-small) {
    display: inline-flex; align-items: center; justify-content: center; text-align: center;
    min-height: 44px; margin-block: .15rem; padding: .52rem .95rem; border: 0; border-radius: .72rem;
    background: var(--sb-adventure-accent); color: #fff; font: inherit; font-weight: 750;
    text-decoration: none; cursor: pointer;
}
.sb-adventure :is(.sb-adventure-button, .sb-adventure-small):hover { background: #54265f; }
.sb-adventure-reset { color: var(--sb-adventure-accent); font-weight: 750; padding: .45rem; }
.sb-adventure-shelf details { border-top: 1px solid var(--sb-adventure-line); padding-block: .65rem; }
.sb-adventure-shelf summary { cursor: pointer; font-weight: 750; }
.sb-adventure-shelf ul { list-style: none; padding: 0; }
.sb-adventure-shelf li { display: flex; gap: .5rem; align-items: center; justify-content: space-between; padding-block: .3rem; }
.sb-adventure-shelf .sb-adventure-small { background: #f0ddf5; color: #502660; }
.sb-adventure-shelf .sb-adventure-small:hover { background: #e8cbed; }
.sb-adventure-worksheet li { margin-block: .8rem; }
.sb-adventure-line { height: 1.6rem; border-bottom: 1px dashed #916ca1; }
.sb-adventure-draw { height: 6rem; margin-top: .35rem; border: 1px dashed #916ca1; border-radius: .55rem; }
@media (max-width: 600px) {
    .sb-adventure-hero { grid-template-columns: minmax(0, 1fr); }
    .sb-adventure-hero img { max-width: 300px; justify-self: center; }
}
@media print {
    body:has(.sb-adventure-worksheet) { background: #fff; }
    body:has(.sb-adventure-worksheet) :is(header, footer, #wpadminbar, .skip-link, [data-sb-print]) { display: none !important; }
    .sb-adventure-worksheet { width: 100%; color: #111; margin: 0; }
    .sb-adventure-worksheet .sb-adventure-card { background: #fff; margin: 0; border-color: #999; }
}
