.header-tools {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.header-tool[hidden] {
    display: none !important;
}

.install-banner {
    display: none;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(30, 132, 73, 0.16);
    border: 1px solid rgba(46, 204, 113, 0.45);
}

.install-banner[hidden] {
    display: none !important;
}

.install-copy {
    flex: 1;
    min-width: 0;
}

.install-copy strong {
    display: block;
    margin-bottom: 2px;
}

.install-copy p {
    margin: 0;
    color: #c5d4de;
    font-size: 0.82rem;
    line-height: 1.35;
}

.install-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: none;
}

.install-go,
.install-dismiss {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 36px;
}

.install-go {
    background: #1e8449;
    color: #fff;
}

.install-go[hidden] {
    display: none !important;
}

.install-dismiss {
    background: transparent;
    color: #c5d4de;
}

.header-tool,
.share-btn,
.speed-btn,
.tour-next,
.tour-back,
.tour-skip {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.28);
}

.header-tool:hover,
.share-btn:hover,
.speed-btn:hover {
    background: #27ae60;
}

.maker-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: 10px;
    background: #2c3e50;
    color: #ecf0f1;
}

.maker-panel label {
    color: #ecf0f1;
}

.quality-native {
    display: none;
}

.quality-scale,
.overlay-row,
.speed-row,
.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quality-scale input[type="range"] {
    flex: 1;
    min-width: 140px;
}

.quality-ends,
.panel-help {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    color: #bdc3c7;
    font-size: 0.82rem;
}

.speed-btn.active {
    background: #27ae60;
    color: #fff;
}

.overlay-row input[type="text"],
.overlay-row select,
.overlay-row input[type="color"] {
    background: #34495e;
    color: #ecf0f1;
    border: 1px solid #85929e;
    border-radius: 8px;
    padding: 8px;
}

.overlay-row input[type="text"] {
    flex: 1;
    min-width: 160px;
}

.overlay-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.share-row {
    justify-content: center;
    margin-top: 14px;
}

.share-row .share-label {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
}

.tour-layer {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.tour-shade {
    position: fixed;
    border-radius: 12px;
    border: 3px solid #2ecc71;
    box-shadow: 0 0 0 9999px rgba(8, 12, 16, 0.78);
    pointer-events: none;
    z-index: 1;
    background: transparent;
}

.tour-card {
    position: fixed;
    z-index: 2;
    width: min(360px, calc(100vw - 24px));
    background: #1e2b38;
    color: #ecf0f1;
    border: 1px solid #27ae60;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.tour-card h3 {
    margin-bottom: 8px;
}

.tour-card p {
    color: #d5dde3;
    line-height: 1.45;
    margin-bottom: 14px;
}

.tour-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.tip-bubble {
    position: fixed;
    z-index: 9000;
    max-width: 260px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #102018;
    color: #ecf0f1;
    border: 1px solid #27ae60;
    font-size: 0.82rem;
    line-height: 1.35;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

@media (max-width: 720px) {
    .source-tab {
        padding: 10px 6px;
        font-size: 12px;
    }
}
