.rtc-guide-trigger {
    min-height: 40px;
    border: 1px solid rgba(79, 70, 229, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #3730a3;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    white-space: nowrap;
}

.rtc-guide-trigger:hover,
.rtc-guide-trigger:focus-visible {
    background: #fff;
    color: #1d4ed8;
    border-color: #818cf8;
}

.rtc-guide-floating {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1060;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
}

.rtc-guide-modal {
    --guide-blue: #2862ad;
    --guide-purple: #6d3bd1;
    --guide-red: #ed174c;
    --guide-border: #d9e2ef;
    z-index: 1090;
}

.rtc-guide-modal .modal-dialog {
    width: min(1440px, calc(100vw - 2rem));
    max-width: 1440px;
    height: min(900px, calc(100vh - 2rem));
    margin: 1rem auto;
}

.rtc-guide-modal .modal-content {
    height: 100%;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.rtc-guide-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 78px;
    padding: 0.9rem 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, #2d66ad, #285ba5);
    border-bottom: 4px solid #8651d2;
}

.rtc-guide-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.2rem;
}

.rtc-guide-eyebrow {
    font-size: 0.7rem;
    line-height: 1.2;
    letter-spacing: 0.11em;
    font-weight: 800;
}

.rtc-guide-title {
    margin: 0.15rem 0 0;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 800;
}

.rtc-guide-toolbar {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--guide-border);
}

.rtc-guide-page-rail {
    padding: 0.55rem 1rem;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid var(--guide-border);
}

.rtc-guide-page-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--guide-purple);
    border-radius: 11px;
    color: #5d3daf;
    background: #f8f5ff;
    font-size: 0.82rem;
    font-weight: 800;
}

.rtc-guide-page-tab-number {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #fff;
    background: var(--guide-purple);
    font-size: 0.75rem;
}

.rtc-guide-page-picker {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: min(360px, 70vw);
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rtc-guide-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    overflow-x: auto;
    background: #f8fafc;
    border-right: 1px solid var(--guide-border);
    border-left: 1px solid var(--guide-border);
    border-bottom: 1px solid var(--guide-border);
    scrollbar-width: thin;
}

.rtc-guide-tab {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.45rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    font-size: 0.82rem;
}

.rtc-guide-tab-number {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.72rem;
}

.rtc-guide-tab.active {
    border-color: var(--guide-blue);
    background: var(--guide-blue);
    color: #fff;
}

.rtc-guide-tab.active .rtc-guide-tab-number {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.rtc-guide-body {
    padding: 1rem;
    background: #f4f7fb;
}

.rtc-guide-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--guide-border);
    border-radius: 14px 14px 0 0;
    background: #fff;
}

.rtc-guide-zoom {
    flex: 0 0 auto;
    min-height: 36px;
    border-color: #cbd5e1;
    color: #334155;
    background: #fff;
    font-weight: 700;
}

.rtc-guide-zoom:hover,
.rtc-guide-zoom:focus-visible {
    color: #1d4ed8;
    border-color: #93c5fd;
    background: #eff6ff;
}

.rtc-guide-kicker {
    color: var(--guide-purple);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rtc-guide-section-heading h3 {
    margin: 0.2rem 0;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
}

.rtc-guide-section-heading p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.rtc-guide-workspace {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 33%);
    min-height: 430px;
    border: 1px solid var(--guide-border);
    border-top: 0;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
}

.rtc-guide-visual {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: #e9eef5;
}

.rtc-guide-visual-bar {
    position: relative;
    z-index: 22;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid var(--guide-border);
    background: #fff;
}

.rtc-guide-visual-label {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.09em;
}

.rtc-guide-operation-copy {
    overflow: hidden;
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.35;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rtc-guide-preview-scroll {
    position: relative;
    flex: 1 1 auto;
    min-height: 388px;
    overflow: auto;
    background: #e9eef5;
    scrollbar-width: thin;
}

.rtc-guide-preview-scroll.is-zoomed {
    cursor: zoom-out;
}

.rtc-guide-preview-sizer {
    position: relative;
    overflow: hidden;
}

.rtc-guide-preview-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 1440px;
    height: 760px;
    overflow: hidden;
    transform-origin: top left;
    background: #fff;
}

.rtc-guide-preview-stage iframe {
    position: absolute;
    inset: 0;
    width: 1440px;
    height: 760px;
    border: 0;
    pointer-events: none;
    background: #fff;
}

.rtc-guide-preview-markers {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
}

.rtc-guide-preview-marker {
    position: absolute;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--guide-red);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.34);
    font-size: 0.78rem;
    font-weight: 900;
    transform: translate(-50%, -50%);
}

.rtc-guide-preview-status {
    position: absolute;
    inset: 1rem;
    z-index: 25;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    color: #475569;
    background: rgba(248, 250, 252, 0.96);
    text-align: center;
    font-size: 0.85rem;
}

.rtc-guide-flow-map {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    gap: 1.25rem 2.5rem;
    height: 100%;
}

.rtc-guide-flow-node {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 108px;
    padding: 1rem;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rtc-guide-flow-node:not(:last-child)::after {
    content: '';
    position: absolute;
    width: 2.5rem;
    height: 2px;
    right: -2.6rem;
    top: 50%;
    background: var(--guide-red);
}

.rtc-guide-flow-node:nth-child(even)::after {
    display: none;
}

.rtc-guide-flow-node-number,
.rtc-guide-step-number {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: var(--guide-red);
    font-weight: 900;
}

.rtc-guide-flow-node-number {
    width: 36px;
    height: 36px;
    box-shadow: 0 0 0 6px rgba(237, 23, 76, 0.1);
}

.rtc-guide-flow-node i {
    color: var(--guide-blue);
    font-size: 1.1rem;
}

.rtc-guide-flow-node h4 {
    margin: 0 0 0.2rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 800;
}

.rtc-guide-flow-node p {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.4;
}

.rtc-guide-numbered {
    position: relative;
    z-index: 20;
    padding: 1rem;
    border-left: 1px solid var(--guide-border);
    background: #f8fafc;
}

.rtc-guide-numbered-title {
    margin-bottom: 0.7rem;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.09em;
}

.rtc-guide-step-list {
    display: grid;
    gap: 0.65rem;
}

.rtc-guide-step-card {
    position: relative;
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid #d8e0eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
}

.rtc-guide-connectors {
    position: absolute;
    inset: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.rtc-guide-connectors polyline {
    fill: none;
    stroke: var(--guide-red);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.rtc-guide-connectors marker path {
    fill: var(--guide-red);
}

.rtc-guide-preview-help {
    margin: 0;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--guide-border);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    color: #64748b;
    background: #fff;
    font-size: 0.75rem;
    line-height: 1.45;
}

.rtc-guide-step-number {
    width: 24px;
    height: 24px;
    font-size: 0.72rem;
}

.rtc-guide-step-card h4 {
    margin: 0 0 0.15rem;
    color: #0f172a;
    font-size: 0.83rem;
    font-weight: 800;
}

.rtc-guide-step-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.4;
}

.rtc-guide-footer {
    display: grid;
    grid-template-columns: auto minmax(100px, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--guide-border);
    background: #fff;
}

.rtc-guide-progress-copy {
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
}

.rtc-guide-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.rtc-guide-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--guide-blue), var(--guide-purple));
    transition: width 0.2s ease;
}

.rtc-guide-footer-actions {
    display: flex;
    gap: 0.5rem;
}

.rtc-guide-footer-actions .btn {
    min-height: 40px;
}

.rtc-guide-center {
    max-width: 1500px;
}

.rtc-guide-center-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(1.4rem, 4vw, 2.6rem);
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #255fa9, #354fb0 62%, #6d3bd1);
    box-shadow: 0 18px 40px rgba(37, 95, 169, 0.22);
}

.rtc-guide-center-hero h1 {
    margin: 0.3rem 0;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 850;
}

.rtc-guide-center-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.rtc-guide-center-tools {
    max-width: 560px;
    margin: 1.5rem 0;
}

.rtc-guide-center-tools .input-group {
    min-height: 48px;
}

.rtc-guide-center-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1rem;
}

.rtc-guide-center-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.rtc-guide-center-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.1);
}

.rtc-guide-center-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #2862ad, #6d3bd1);
    font-size: 1.2rem;
}

.rtc-guide-center-card h2 {
    margin: 0 0 0.25rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.rtc-guide-center-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.rtc-guide-center-meta {
    margin-top: 0.5rem;
    color: #6d3bd1;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rtc-guide-center-card .btn {
    grid-column: 1 / -1;
    min-height: 40px;
}

.rtc-guide-center-empty {
    padding: 3rem;
    text-align: center;
    color: #64748b;
}

@media (max-width: 900px) {
    .rtc-guide-modal .modal-dialog {
        width: 100%;
        max-width: none;
        height: 100%;
        margin: 0;
    }

    .rtc-guide-modal .modal-content {
        border-radius: 0;
    }

    .rtc-guide-workspace {
        grid-template-columns: 1fr;
    }

    .rtc-guide-numbered {
        border-top: 1px solid var(--guide-border);
        border-left: 0;
    }

    .rtc-guide-connectors {
        display: none;
    }

    .rtc-guide-footer {
        grid-template-columns: 1fr;
    }

    .rtc-guide-footer-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 620px) {
    .rtc-guide-trigger span,
    .rtc-guide-open-page {
        display: none;
    }

    .rtc-guide-trigger {
        width: 40px;
        padding: 0;
    }

    .rtc-guide-toolbar {
        align-items: stretch;
    }

    .rtc-guide-page-picker {
        min-width: 0;
        width: 100%;
    }

    .rtc-guide-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .rtc-guide-zoom {
        align-self: flex-start;
    }

    .rtc-guide-operation-copy {
        display: none;
    }

    .rtc-guide-preview-scroll {
        min-height: 260px;
    }

    .rtc-guide-flow-map {
        grid-template-columns: 1fr;
    }

    .rtc-guide-flow-node:not(:last-child)::after {
        width: 2px;
        height: 1.25rem;
        left: 50%;
        right: auto;
        top: auto;
        bottom: -1.3rem;
    }

    .rtc-guide-flow-node:nth-child(even)::after {
        display: block;
    }

    .rtc-guide-flow-node:last-child::after {
        display: none;
    }

    .rtc-guide-center-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .rtc-guide-center-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rtc-guide-progress span {
        transition: none;
    }
}
