/* Панель сценариев и знакомство используют цвета и шрифты исходного Via. */
body[data-demo-skin] { --demo-accent: #556ee6; --demo-accent-dark: #485ec4; --demo-accent-soft: #eff2f7; --demo-ink: #495057; --demo-line: #ced4da; --demo-muted: #74788d; }

#demo-toggle, #demo-tour, #demo-intro, #via-demo-toolbar, .via-demo-notice { box-sizing: border-box; font-family: var(--bs-body-font-family, Roboto, Arial, sans-serif); }
#demo-tour *, #demo-intro *, #via-demo-toolbar * { box-sizing: border-box; }
#demo-toggle { position: fixed; right: 20px; bottom: 82px; z-index: 2147482100; display: flex; align-items: center; justify-content: center; min-width: 74px; height: 42px; padding: 0 17px; border: 1px solid var(--demo-accent, #556ee6); border-radius: 24px; background: var(--demo-accent, #556ee6); color: #fff; box-shadow: 0 5px 20px rgba(18, 38, 63, .18); font-size: 12px; font-weight: 800; letter-spacing: .09em; cursor: pointer; }
#demo-toggle:hover, #demo-toggle[aria-expanded="true"] { background: var(--demo-accent-dark, #485ec4); }
#demo-tour { position: fixed; right: 20px; bottom: 138px; z-index: 2147482099; width: min(390px, calc(100vw - 28px)); color: var(--demo-ink, #495057); }
#demo-tour[hidden], #demo-intro[hidden] { display: none; }
.demo-tour-card { padding: 19px; border: 1px solid var(--demo-line, #ced4da); border-radius: .25rem; background: #fff; box-shadow: 0 16px 65px rgba(18, 38, 63, .2); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.demo-tour-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.demo-tour-header strong { display: block; margin: 3px 0 0; font-size: 17px; line-height: 1.4; font-weight: 750; color: var(--demo-ink, #495057); }
.demo-tour-label { display: block; color: var(--demo-accent, #556ee6); font-size: 10px; font-weight: 800; letter-spacing: .1em; line-height: 1.5; text-transform: uppercase; }
.via-demo-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--demo-line, #ced4da); border-radius: .25rem; background: #fff; color: var(--demo-ink, #495057); font-size: 12px; line-height: 1.25; font-weight: 650; text-align: center; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.via-demo-button:hover { background: var(--demo-accent-soft, #eff2f7); border-color: var(--demo-accent, #556ee6); color: var(--demo-ink, #495057); text-decoration: none; }
.via-demo-primary { color: #fff; background: var(--demo-accent, #556ee6); border-color: var(--demo-accent, #556ee6); }
.via-demo-primary:hover { color: #fff; background: var(--demo-accent-dark, #485ec4); border-color: var(--demo-accent-dark, #485ec4); }
.via-demo-button:disabled, .demo-tour-scenario:disabled { opacity: .5; cursor: wait; }
.demo-icon-button { flex: 0 0 auto; width: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 50%; background: #eff2f7; color: #74788d; font-size: 25px; font-weight: 400; line-height: 1; }
#demo-toggle:focus-visible, #demo-tour :is(button, select, a):focus-visible, #demo-intro :is(button, select, a):focus-visible, #via-demo-toolbar :is(button, select, a):focus-visible { outline: 3px solid #556ee6 !important; outline-offset: 3px; }
.demo-tour-controls { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin: 17px 0 12px; }
.demo-tour-controls label, .demo-tour-scenario-select { margin: 0; min-width: 0; color: var(--demo-muted, #74788d); font-size: 11px; font-weight: 650; line-height: 1.5; }
.demo-tour-controls select, .demo-tour-scenario-select select { display: block; width: 100%; min-height: 36px; margin-top: 5px; padding: 7px 26px 7px 9px; border: 1px solid var(--demo-line, #ced4da); border-radius: .25rem; background: #fff; color: var(--demo-ink, #495057); font-size: 12px; line-height: 1.3; font-family: inherit; }
.demo-tour-summary, .demo-tour-step-text { margin: 0 0 14px; color: #495057; font-size: 12px; line-height: 1.65; }
.demo-tour-scenarios { display: grid; gap: 8px; }
.demo-tour-scenario { display: flex; align-items: flex-start; width: 100%; min-width: 0; gap: 10px; padding: 12px; border: 1px solid var(--demo-line, #ced4da); border-radius: .25rem; background: #fff; color: var(--demo-ink, #495057); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.demo-tour-scenario:hover { border-color: var(--demo-accent, #556ee6); background: var(--demo-accent-soft, #eff2f7); }
.demo-tour-number { display: flex; flex: 0 0 24px; align-items: center; justify-content: center; height: 24px; margin-top: 1px; border-radius: .25rem; background: var(--demo-accent-soft, #eff2f7); color: var(--demo-accent, #556ee6); font-size: 10px; font-weight: 800; }
.demo-tour-scenario-copy { display: block; flex: 1; min-width: 0; }
.demo-tour-scenario-copy > strong { display: block; margin: 0 0 4px; font-size: 12px; line-height: 1.45; font-weight: 750; }
.demo-tour-scenario-copy > span { display: block; color: var(--demo-muted, #74788d); font-size: 11px; line-height: 1.55; }
.demo-tour-arrow { color: var(--demo-accent, #556ee6); font-size: 16px; }
.demo-tour-scenario-select { display: block; margin: 15px 0; }
.demo-tour-step-counter { display: flex; justify-content: space-between; gap: 12px; margin: 15px 0 8px; color: var(--demo-muted, #74788d); font-size: 10px; line-height: 1.4; }
.demo-tour-step-counter > span:first-child { color: var(--demo-accent, #556ee6); font-weight: 700; }
.demo-tour-progress { height: 4px; overflow: hidden; border-radius: 4px; background: var(--demo-accent-soft, #eff2f7); }
.demo-tour-progress span { display: block; height: 100%; background: var(--demo-accent, #556ee6); }
.demo-tour-step-title { margin: 20px 0 10px; color: var(--demo-ink, #495057); font-size: 18px; line-height: 1.3; font-weight: 750; letter-spacing: -.02em; }
.demo-tour-navigation { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-tour-navigation .via-demo-primary { margin-left: auto; }
.demo-tour-save-note { margin: 13px 0 0; color: #74788d; font-size: 10px; line-height: 1.5; }
.demo-tour-message { margin: 12px 0 0; color: var(--demo-accent, #556ee6); font-size: 12px; line-height: 1.5; }
.demo-tour-error { color: #f46a6a; }
.demo-tour-footer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--demo-line, #ced4da); }
.demo-tour-footer .via-demo-button { flex: 1; min-height: 32px; padding: 7px 6px; font-size: 10px; }
.demo-reset-button { color: #74788d; }
.demo-tour-cta { display: flex; justify-content: space-between; gap: 9px; margin-top: 14px; padding: 12px; border-radius: .25rem; background: var(--demo-accent-soft, #eff2f7); color: var(--demo-accent-dark, #485ec4); font-size: 12px; font-weight: 750; line-height: 1.4; text-decoration: none; }
.demo-tour-cta:hover { text-decoration: underline; color: var(--demo-accent-dark, #485ec4); }
.demo-tour-local-note { margin: 11px 0 0; color: #74788d; font-size: 9px; line-height: 1.7; }
.demo-tour-highlight { outline: 3px solid var(--demo-accent, #556ee6); outline-offset: 3px; scroll-margin: 100px 20px 30px; }

#demo-intro { position: fixed; inset: 0; z-index: 2147482500; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(38, 43, 60, .65); backdrop-filter: blur(5px); color: var(--demo-ink, #495057); }
.demo-intro-card { display: flex; flex-direction: column; width: min(930px, 100%); max-height: calc(100dvh - 44px); margin: 0; overflow: hidden; border: 1px solid #ffffff80; border-radius: .25rem; background: #fff; box-shadow: 0 28px 110px rgba(18, 38, 63, .35); }
.demo-intro-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex: 0 0 auto; padding: 19px 30px; border-bottom: 1px solid #eff2f7; }
.demo-intro-brand { display: flex; align-items: center; gap: 11px; color: var(--demo-ink, #495057); font-size: 17px; font-weight: 800; }
.demo-brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: .25rem; background: var(--demo-accent, #556ee6); color: #fff; font-size: 22px; font-weight: 900; }
.demo-intro-brand small { display: block; margin-top: 2px; color: var(--demo-muted, #74788d); font-size: 10px; font-weight: 500; }
.demo-intro-body { padding: 24px 30px 8px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.demo-intro-heading { max-width: 660px; }
.demo-intro-heading .demo-tour-label { margin-bottom: 12px; }
.demo-intro-heading h1 { margin: 0 0 15px; color: var(--demo-ink, #495057); font-size: clamp(27px, 4vw, 40px); line-height: 1.13; letter-spacing: -.04em; font-weight: 800; }
.demo-intro-heading p { margin: 0; color: #74788d; font-size: 14px; line-height: 1.65; }
.demo-intro-process { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 0; padding: 15px 20px; border-radius: .25rem; background: var(--demo-accent-soft, #eff2f7); font-size: 12px; font-weight: 750; }
.demo-intro-process i { color: var(--demo-accent, #556ee6); font-size: 17px; font-style: normal; }
#demo-intro .demo-tour-controls { grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 9px; }
#demo-intro .demo-tour-controls select { min-height: 39px; font-size: 12px; }
.demo-intro-skin-note { margin: 0 0 25px; color: var(--demo-muted, #74788d); font-size: 10px; line-height: 1.55; }
.demo-intro-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 0 0 12px; align-items: baseline; }
.demo-intro-section-heading h2 { margin: 0; color: var(--demo-ink, #495057); font-size: 17px; font-weight: 750; line-height: 1.4; }
.demo-intro-section-heading > span { color: var(--demo-muted, #74788d); font-size: 10px; }
.demo-intro-scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
#demo-intro .demo-tour-scenario { padding: 15px 13px; border-radius: .25rem; }
#demo-intro .demo-tour-scenario:last-child:nth-child(odd) { grid-column: 1 / -1; }
#demo-intro .demo-tour-scenario-copy > strong { font-size: 13px; }
.demo-scenario-benefits { display: grid !important; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--demo-line, #ced4da); }
.demo-scenario-benefits > span { display: block; font-size: 10px; line-height: 1.5; }
.demo-scenario-benefits b { display: block; margin-bottom: 3px; color: var(--demo-accent-dark, #485ec4); font-size: 9px; font-weight: 750; }
.demo-intro-notice { display: flex; gap: 12px; padding: 13px 16px; border-radius: .25rem; background: #eff2f7; }
.demo-intro-notice > span { display: grid; flex: 0 0 25px; place-items: center; height: 25px; border-radius: 50%; background: #556ee6; color: #fff; font-size: 14px; font-weight: 800; }
.demo-intro-notice p { margin: 0; color: #495057; font-size: 11px; line-height: 1.6; }
.demo-intro-notice strong { color: #495057; }
.demo-intro-extensions { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding: 15px 16px; border: 1px solid var(--demo-line, #ced4da); border-radius: .25rem; }
.demo-intro-extensions > div { flex: 1; }
.demo-intro-extensions strong { font-size: 12px; }
.demo-intro-extensions p { margin: 4px 0 0; color: var(--demo-muted, #74788d); font-size: 10px; line-height: 1.6; }
.demo-intro-extensions button { flex: 0 0 auto; }
.demo-intro-help { margin: 13px 0 0; color: var(--demo-muted, #74788d); font-size: 10px; line-height: 1.7; }
.demo-intro-status { margin: 8px 0 0; color: #f46a6a; font-size: 11px; line-height: 1.5; }
.demo-intro-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: 0 0 auto; padding: 17px 30px; border-top: 1px solid #eff2f7; background: #f8f8fb; }
.demo-intro-footer .via-demo-button { min-height: 40px; padding: 10px 15px; }
.demo-intro-footer .via-demo-button:first-child { margin-right: auto; }

/* Добавленные элементы демо. Штатные панели Via оформляются исходным Style.css. */
#via-demo-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; min-width: 0; padding: 5px 14px; }
.via-demo-brand { display: flex; align-items: center; gap: 7px; color: #fff; font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.via-demo-brand > b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: .25rem; background: #ffffff20; color: #fff; font-size: 20px; }
.via-demo-brand > span { text-align: left; }
.via-demo-brand small, .via-demo-concept-label { display: block; color: #ffffffad; font-size: 9px; font-weight: 500; }
.via-demo-local { color: #ffffffa3; font-size: 9px; white-space: nowrap; }
#via-demo-toolbar label { display: flex; align-items: center; gap: 7px; margin: 0; color: #ffffffb8; font-size: 10px; }
#via-demo-toolbar select { min-height: 32px; max-width: 160px; padding: 6px 24px 6px 9px; border: 1px solid #ffffff3d; border-radius: .25rem; background: #ffffff15; color: #fff; font-size: 11px; line-height: 1.3; font-family: inherit; }
#via-demo-toolbar select option { background: #fff; color: #495057; }
#via-demo-toolbar button, #via-demo-toolbar a:not(.via-demo-brand) { border-color: #ffffff35; background: #ffffff16; color: #fff; font-size: 10px; }
.via-demo-notice { position: fixed; top: 76px; left: 50%; z-index: 2147481800; max-width: min(600px, calc(100vw - 28px)); padding: 11px 17px; transform: translateX(-50%); border: 1px solid var(--demo-line, #ced4da); border-radius: .25rem; background: #fff; color: var(--demo-ink, #495057); box-shadow: 0 8px 32px rgba(18, 38, 63, .14); font-size: 12px; line-height: 1.55; }
.via-demo-notice:empty { display: none; }

@media (max-width: 1000px) {
    #via-demo-toolbar { gap: 7px; padding: 5px 10px; }
    #via-demo-toolbar label { font-size: 0; gap: 0; }
    #via-demo-toolbar select { max-width: 145px; }
    #via-demo-toolbar .via-demo-brand { display: none; }
}
@media (max-width: 640px) {
    #demo-toggle { right: 14px; min-width: 68px; }
    #demo-tour { right: 14px; }
    .demo-tour-card { padding: 15px; border-radius: .25rem; }
    #demo-intro { padding: 10px; }
    .demo-intro-card { max-height: calc(100dvh - 20px); border-radius: .25rem; }
    .demo-intro-header { padding: 14px 17px; }
    .demo-intro-body { padding: 21px 17px 7px; }
    .demo-intro-heading h1 { font-size: 27px; }
    .demo-intro-heading p { font-size: 12px; }
    .demo-intro-process { padding: 12px 10px; margin: 19px 0; gap: 5px; font-size: 10px; }
    #demo-intro .demo-tour-controls { grid-template-columns: 1fr 1fr; gap: 8px; }
    #demo-intro .demo-tour-controls select { font-size: 11px; padding-left: 7px; }
    .demo-intro-scenarios { grid-template-columns: 1fr; gap: 8px; }
    #demo-intro .demo-tour-scenario { padding: 13px 11px; }
    #demo-intro .demo-tour-scenario:last-child { grid-column: auto; }
    .demo-scenario-benefits { margin-top: 9px; padding-top: 9px; }
    .demo-intro-extensions { align-items: flex-start; gap: 9px; flex-direction: column; padding: 13px; }
    .demo-intro-footer { justify-content: stretch; gap: 7px; padding: 12px 17px; }
    .demo-intro-footer .via-demo-button { flex: 1 1 42%; min-height: 38px; padding: 9px 10px; font-size: 11px; }
    .demo-intro-footer .via-demo-button:first-child { margin-right: 0; }
    .demo-intro-footer .via-demo-primary { flex-basis: 100%; }
    #via-demo-toolbar { max-width: 100%; gap: 5px; padding: 5px 7px; }
    #via-demo-toolbar select { width: 118px; max-width: 118px; font-size: 10px; min-height: 30px; padding-left: 6px; }
    #via-demo-toolbar button { padding: 6px; min-height: 30px; }
    #via-demo-toolbar .via-demo-concept-label, #via-demo-toolbar .via-demo-local { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
    #demo-tour { width: min(460px, calc(100vw - 28px)); }
    .demo-tour-card { padding: 13px; }
    #demo-intro { padding: 8px; }
    .demo-intro-card { max-height: calc(100dvh - 16px); }
    .demo-intro-header { padding: 10px 18px; }
    .demo-intro-footer { padding: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    #demo-tour *, #demo-intro *, #demo-toggle, #via-demo-toolbar * { transition: none; scroll-behavior: auto; }
    #demo-intro { backdrop-filter: none; }
}
/* Adapt window position to a phone without changing the native Via palette. */
@media(max-width:767px){body[data-demo-skin] .dop_close_window{left:10px!important;top:76px!important;position:fixed!important;max-width:calc(100vw - 20px);max-height:calc(100dvh - 90px);overflow:auto}body[data-demo-skin] #workSpase{overflow-x:auto}}
