.home-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}
.home-intro .description { margin-bottom: 0; }
.home-tutorial-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #3b82f6;
    border-radius: 12px;
    background: #1d4ed8;
    color: #fff;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
}
.home-tutorial-button:hover { background: #1e40af; }
html.app-tutorial-open { overflow: hidden !important; }
.app-tutorial-modal {
    position: fixed;
    inset: 0;
    z-index: 999990;
    display: grid;
    place-items: center;
    padding: 12px;
    color: #f8fafc;
}
.app-tutorial-modal[hidden] { display: none !important; }
.app-tutorial-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.72); }
.app-tutorial-card {
    --tutorial-soft: #222b38;
    --tutorial-muted: #cbd5e1;
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0,1fr) auto;
    width: min(680px,100%);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    min-height: 0;
    overflow: hidden;
    border: 1px solid #64748b;
    border-radius: 22px;
    background: #151c27;
    box-shadow: 0 24px 80px rgba(0,0,0,.4);
    font-family: var(--font-family,system-ui,sans-serif);
    line-height: 1.55;
}
.app-tutorial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px 10px;
}
.app-tutorial-header strong { display: block; font-size: 1rem; }
.app-tutorial-progress { color: var(--tutorial-muted); font-size: .82rem; }
.app-tutorial-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid #64748b;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 1.6rem;
    cursor: pointer;
}
.app-tutorial-picker { padding: 0 24px 16px; }
.app-tutorial-picker label { color: var(--tutorial-muted); font-size: .85rem; }
.app-tutorial-picker select {
    min-height: 44px;
    margin: 0;
    background-color: var(--tutorial-soft);
    color: inherit;
    border-color: #64748b;
    font-size: 1rem;
}
.app-tutorial-picker option { color: inherit; background: #151c27; }
.app-tutorial-content {
    min-height: 0;
    padding: 4px 24px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
}
.app-tutorial-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: var(--tutorial-soft);
    color: #93c5fd;
    font-size: 1.5rem;
    font-weight: 700;
}
.app-tutorial-icon svg { width: 28px; height: 28px; }
.app-tutorial-content h2 { margin: 0 0 10px; font-size: 1.5rem; line-height: 1.25; }
.app-tutorial-content p { margin: 0 0 18px; }
.app-tutorial-content h3 { margin: 20px 0 8px; font-size: 1rem; }
.app-tutorial-steps { margin: 0; padding-left: 24px; }
.app-tutorial-steps li { padding-left: 4px; margin-bottom: 10px; }
.app-tutorial-example {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--tutorial-soft);
}
.app-tutorial-example strong { display: block; margin-bottom: 4px; }
.app-tutorial-example p { margin: 0; }
.app-tutorial-location { margin-top: 18px !important; margin-bottom: 0 !important; color: var(--tutorial-muted); font-size: .85rem; }
.app-tutorial-footer {
    padding: 16px 24px;
    border-top: 1px solid #64748b;
    background: #151c27;
}
.app-tutorial-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-tutorial-actions button {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #64748b;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
}
.app-tutorial-actions button:disabled { opacity: .5; cursor: default; }
.app-tutorial-actions #app-tutorial-next { margin-left: auto; border-color: #1d4ed8; background: #1d4ed8; color: #fff; font-weight: 600; }
.app-tutorial-footer > p { margin: 10px 0 0; color: var(--tutorial-muted); font-size: .78rem; }
body.theme-light .app-tutorial-modal { color: #172033; }
body.theme-light .app-tutorial-card { --tutorial-soft: #eff4fc; --tutorial-muted: #475569; background: #fff; border-color: #94a3b8; }
body.theme-light .app-tutorial-picker select { background-color: #f8fafc; color: #172033; }
body.theme-light .app-tutorial-picker option { color: #172033; background: #fff; }
body.theme-light .app-tutorial-icon { color: #1d4ed8; }
body.theme-light .app-tutorial-footer { background: #fff; border-color: #cbd5e1; }
@media (max-width: 520px) {
    .home-intro { align-items: flex-start; gap: 12px; }
    .home-tutorial-button { width: 100%; }
    .app-tutorial-card { border-radius: 16px; }
    .app-tutorial-header { padding: 14px 16px 8px; }
    .app-tutorial-picker { padding: 0 16px 12px; }
    .app-tutorial-content { padding: 4px 16px 20px; }
    .app-tutorial-content h2 { font-size: 1.3rem; }
    .app-tutorial-footer { padding: 12px 16px; }
    .app-tutorial-actions #app-tutorial-next { flex: 1 1 100%; margin-left: 0; }
    .app-tutorial-actions button:not(#app-tutorial-next) { flex: 1; }
}
