.app-howto {
    margin: 1.6rem 0 0;
    padding: 1.2rem 1.25rem 1.4rem;
    border: 1px solid var(--border, #3a4250);
    border-radius: 12px;
    background: var(--surface);
}
.app-howto h2,
.app-howto summary {
    margin: 0 0 0.6rem;
    font-size: 1.2rem;
    font-weight: 600;
}
.app-howto summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    cursor: pointer;
    list-style: none;
    margin: 0;
}
.app-howto summary::-webkit-details-marker { display: none; }
.app-howto details.howto-fold > summary {
    min-height: 2.4rem;
}
.app-howto details[open] > summary { margin-bottom: 0.85rem; }
.app-howto:has(details.howto-fold:not([open])) {
    padding: 0.45rem 1rem;
}
.howto-summary-title {
    font-weight: 600;
}
.howto-summary-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted, #8b93a2);
    letter-spacing: 0.01em;
}
.app-howto details:not([open]) .howto-summary-open { display: none; }
.app-howto details[open] .howto-summary-closed { display: none; }
.howto-summary-arrow {
    display: inline-block;
    width: 0.48rem;
    height: 0.48rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -0.2rem;
}
.app-howto details[open] .howto-summary-arrow {
    transform: rotate(-135deg);
    margin-top: 0.15rem;
}
.app-howto summary:hover .howto-summary-hint {
    color: var(--text, #f4f6fb);
}
.howto-lede {
    margin: 0 0 1.1rem;
    font-size: 1rem;
    line-height: 1.45;
    max-width: 48rem;
}
.howto-video {
    margin: 0 0 1.1rem;
    max-width: 52rem;
}
.howto-video video {
    display: block;
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border, #3a4250);
    background: #111;
}
.howto-video-empty {
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px dashed var(--border, #3a4250);
    color: var(--muted, #8b93a2);
    font-size: 0.92rem;
    background: color-mix(in srgb, var(--surface-alt, var(--bg)) 70%, transparent);
}
.howto-step {
    display: grid;
    gap: 0.55rem;
    margin: 0 0 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--border, #3a4250) 80%, transparent);
}
.howto-step:first-of-type { border-top: 0; padding-top: 0; }
.howto-step h3 {
    margin: 0;
    font-size: 1.05rem;
}
.howto-step p { margin: 0; max-width: 48rem; }
.howto-step ul {
    margin: 0;
    padding-left: 1.2rem;
    max-width: 48rem;
}
.howto-step li { margin: 0.25rem 0; }
.howto-example {
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: color-mix(in srgb, #f89938 12%, transparent);
    max-width: 48rem;
}
.howto-fig {
    margin: 0.2rem 0;
}
.howto-fig img {
    display: block;
    width: 100%;
    max-width: 52rem;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border, #3a4250);
    background: var(--bg);
}
.howto-fig figcaption {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted, #8b93a2);
}
.app-howto kbd {
    font: inherit;
    font-size: 0.85em;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    border: 1px solid var(--border, #3a4250);
    background: var(--ghost);
}
body.fd-present .app-howto { display: none !important; }
body.fd-view .app-howto {
    margin: 0.85rem 0.75rem 1.2rem;
}

.howto-topbtn {
    position: relative;
    display: none;
    min-height: 40px;
    padding: 0.45rem 0.75rem;
    background: #282828;
    color: #efece6;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 0;
    border-radius: 6px;
}
@media (max-width: 640px) {
    .howto-topbtn {
        padding: 0.4rem 0.55rem;
    }
}
.howto-topbtn.is-on {
    display: inline-flex;
    align-items: center;
}
.howto-topbtn:hover,
.howto-topbtn:focus {
    background: #f89938;
    color: #282828;
}
html[data-theme="light"] .howto-topbtn {
    background: #282828;
    color: #fff4e8;
}

html.howto-shot .testdesk-banner,
html.howto-shot .plan-banner {
    display: none !important;
}
html.howto-shot .user-pill {
    visibility: hidden;
}
html.howto-shot .howto-topbtn {
    display: none !important;
}
