/* =========================================
   NERDZAP TEST LAB - shared styles
   Used by /tools/test-lab/, /tools/capture-card-tester/, /tools/controller-tester/
   ========================================= */

.tl-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tl-panel h2 {
    font-size: 1.3rem;
    color: white;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tl-muted { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

.tl-btn {
    appearance: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--accent-primary);
    color: #000;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.tl-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px var(--accent-glow); }
.tl-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.tl-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
}
.tl-btn.secondary:hover { box-shadow: none; border-color: var(--accent-primary); }
.tl-btn.small { padding: 8px 14px; font-size: 0.85rem; border-radius: 8px; }

.tl-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tl-row + .tl-row { margin-top: 12px; }

.tl-select {
    font-family: inherit;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    min-width: 0;
    flex: 1 1 240px;
    max-width: 100%;
    text-overflow: ellipsis;
}

.tl-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

/* Stat tiles */
.tl-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}
.tl-stat {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
    min-width: 0;
}
.tl-stat-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.tl-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
}
.tl-stat-value.small { font-size: 0.95rem; }

/* Status pills / verdicts */
.tl-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.tl-good { color: #4ade80; background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.35); }
.tl-warn { color: #facc15; background: rgba(250, 204, 21, 0.12); border: 1px solid rgba(250, 204, 21, 0.35); }
.tl-bad  { color: #f87171; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.35); }
.tl-idle { color: var(--text-muted); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); }

.tl-verdict {
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 20px;
    line-height: 1.6;
}
.tl-verdict h3 { margin: 0 0 8px 0; font-size: 1.15rem; color: white; }
.tl-verdict p { margin: 0 0 12px 0; color: #cbd5e1; font-size: 0.95rem; }
.tl-verdict.tl-good, .tl-verdict.tl-warn, .tl-verdict.tl-bad { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 1rem; }

/* Message box (replaces alert()) */
.tl-msg {
    display: none;
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.tl-msg.show { display: block; }

/* Resolution probe table */
.tl-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
.tl-table th, .tl-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tl-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.tl-table td { color: var(--text-main); }

/* Video preview */
.tl-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.tl-video-wrap video { width: 100%; height: 100%; object-fit: contain; display: block; }
.tl-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}
.tl-video-placeholder .tl-big-icon { font-size: 2.5rem; }

/* Audio meter */
.tl-meter {
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.tl-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4ade80, #facc15 70%, #f87171);
    transition: width 0.08s linear;
}

/* Steps list */
.tl-steps { counter-reset: tlstep; list-style: none; padding: 0; margin: 0; }
.tl-steps li {
    counter-increment: tlstep;
    position: relative;
    padding: 0 0 14px 44px;
    color: #cbd5e1;
    line-height: 1.6;
}
.tl-steps li::before {
    content: counter(tlstep);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: var(--accent-primary);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* FAQ */
.tl-faq details { margin-bottom: 10px; }
.tl-faq summary { text-transform: none; font-size: 0.95rem; gap: 10px; }

/* The hidden attribute must win over display rules above */
.tl-panel [hidden] { display: none !important; }

/* ---------- Controller tester ---------- */
.ct-pad-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.ct-pad-tab {
    appearance: none;
    font-family: inherit;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}
.ct-pad-tab.active { border-color: var(--accent-primary); color: var(--accent-primary); background: rgba(249, 115, 22, 0.1); }

.ct-pad-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    overflow-wrap: anywhere;
}

.ct-sticks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}
.ct-stick-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    min-width: 0;
}
.ct-stick-card h3 { margin: 0 0 10px 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.ct-stick-canvas { width: 100%; max-width: 220px; aspect-ratio: 1 / 1; display: block; margin: 0 auto; }
.ct-stick-readout {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
    white-space: pre-line;
}

.ct-triggers { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }
.ct-trigger-bar {
    height: 14px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-top: 6px;
}
.ct-trigger-fill { height: 100%; width: 0%; background: var(--accent-primary); }

.ct-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 8px;
    margin-top: 15px;
}
.ct-btn {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 4px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: background 0.05s, color 0.05s, border-color 0.05s;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ct-btn.pressed { background: var(--accent-primary); border-color: var(--accent-primary); color: #000; }
.ct-btn.tested { border-color: rgba(74, 222, 128, 0.5); }
.ct-btn.pressed.tested { border-color: var(--accent-primary); }

.ct-axes { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

@media (max-width: 650px) {
    .tl-panel { padding: 18px; }
    .tl-stat { padding: 10px 12px; }
    .tl-stat-value { font-size: 1rem; }
    .tl-btn { width: 100%; }
    .tl-btn.small { width: auto; }
    .ct-triggers { grid-template-columns: 1fr; }
    .tl-table th:nth-child(3), .tl-table td:nth-child(3) { display: none; }
}

/* ---------- Shared form controls (Lab tools) ---------- */
.tl-field { min-width: 0; flex: 1 1 220px; }
.tl-field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tl-field-head .tl-label { margin-bottom: 6px; }
.tl-field-val { font-size: 0.85rem; color: var(--accent-primary); font-weight: 800; font-variant-numeric: tabular-nums; }
.tl-range { width: 100%; accent-color: var(--accent-primary); }
.tl-input {
    font-family: inherit;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}
.tl-check { display: inline-flex; align-items: center; gap: 8px; color: #cbd5e1; font-size: 0.95rem; cursor: pointer; }
.tl-check input { accent-color: var(--accent-primary); width: 18px; height: 18px; }
.tl-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }

.tl-progress { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.tl-progress-fill { height: 100%; width: 0%; background: var(--accent-primary); transition: width 0.1s linear; }

.tl-code {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #020617;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 12px 12px 15px;
    margin-top: 8px;
}
.tl-code code {
    flex: 1 1 auto;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: #a3e635;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

/* ---------- Boot Video Maker ---------- */
.bvm-drop {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: var(--text-muted);
}
.bvm-drop:hover, .bvm-drop:focus-visible, .bvm-drop.dragging {
    border-color: var(--accent-primary);
    background: rgba(249, 115, 22, 0.05);
    outline: none;
}
.bvm-drop strong { color: white; display: block; font-size: 1.1rem; margin: 10px 0 6px; }
.bvm-canvas {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.bvm-result-video { width: 100%; border-radius: 10px; background: #000; border: 1px solid var(--border-color); display: block; }

/* Long paths in inline code must wrap on small screens */
.tl-panel code { overflow-wrap: anywhere; word-break: break-word; }

/* ---------- Generic tabs + textarea ---------- */
.tl-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.tl-tab {
    appearance: none;
    font-family: inherit;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}
.tl-tab.active { border-color: var(--accent-primary); color: var(--accent-primary); background: rgba(249, 115, 22, 0.1); }
.tl-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    width: 100%;
    min-height: 180px;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.5;
}
.tl-issues { margin: 12px 0 0 0; padding-left: 20px; color: #cbd5e1; line-height: 1.6; font-size: 0.95rem; }
.tl-issues li { margin-bottom: 4px; }
.tl-file-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tl-file-name { font-size: 0.85rem; color: var(--text-muted); overflow-wrap: anywhere; min-width: 0; }

/* ---------- Creator Kit: YouTube-style mockups (generic styling, no YouTube branding) ---------- */
.yt-stage {
    background: #0f0f0f;
    color: #f1f1f1;
    border-radius: 12px;
    padding: 20px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.yt-stage.light { background: #ffffff; color: #0f0f0f; }
.yt-stage .yt-sub { color: #aaaaaa; }
.yt-stage.light .yt-sub { color: #606060; }
.yt-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #272727;
}
.yt-stage.light .yt-thumb { background: #e5e5e5; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-thumb-ph {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f97316, #7c3aed);
    color: #fff; font-weight: 800; font-size: 1rem; text-align: center; padding: 10px; box-sizing: border-box;
}
.yt-dur {
    position: absolute; right: 6px; bottom: 6px;
    background: rgba(0, 0, 0, 0.8); color: #fff;
    font-size: 12px; font-weight: 500; line-height: 18px;
    padding: 0 4px; border-radius: 4px;
}
.yt-ab {
    position: absolute; top: 6px; left: 6px;
    background: var(--accent-primary); color: #000;
    font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 4px;
}
.yt-mine .yt-thumb { box-shadow: 0 0 0 2px var(--accent-primary); }
.yt-title {
    font-size: 16px; line-height: 22px; font-weight: 500; margin: 0 0 4px 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
.yt-sub { font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; }
.yt-avatar {
    width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
    background: #3f3f3f; color: #fff; overflow: hidden;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.yt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.yt-avatar.sm { width: 24px; height: 24px; flex-basis: 24px; font-size: 11px; }
.yt-meta { display: flex; gap: 12px; margin-top: 12px; min-width: 0; }
.yt-meta > div { min-width: 0; }

.yt-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }

.yt-search-row { display: flex; gap: 16px; margin-bottom: 16px; min-width: 0; }
.yt-search-row .yt-thumb { flex: 0 0 46%; max-width: 360px; }
.yt-search-row .yt-title { font-size: 18px; line-height: 26px; }
.yt-search-row .yt-sub { font-size: 12px; line-height: 18px; }
.yt-search-row .yt-chan { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.yt-search-row .yt-desc { font-size: 12px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.yt-side { max-width: 420px; }
.yt-side-row { display: flex; gap: 8px; margin-bottom: 8px; min-width: 0; }
.yt-side-row .yt-thumb { flex: 0 0 168px; border-radius: 8px; }
.yt-side-row .yt-title { font-size: 14px; line-height: 20px; }
.yt-side-row .yt-sub { font-size: 12px; line-height: 18px; }

.yt-phone { width: 360px; max-width: 100%; margin: 0 auto; border-radius: 24px; border: 6px solid #2a2a2a; padding: 0; }
.yt-phone .yt-card { margin-bottom: 18px; }
.yt-phone .yt-thumb { border-radius: 0; }
.yt-phone .yt-meta { padding: 0 12px; }
.yt-phone .yt-title { font-size: 14px; line-height: 20px; }
.yt-phone .yt-sub { font-size: 12px; line-height: 18px; }

.yt-skel-line { height: 12px; border-radius: 6px; background: rgba(127, 127, 127, 0.25); margin-bottom: 8px; }

@media (max-width: 650px) {
    .yt-home-grid { grid-template-columns: 1fr; }
    .yt-search-row { flex-direction: column; }
    .yt-search-row .yt-thumb { flex-basis: auto; max-width: none; }
    .yt-side-row .yt-thumb { flex-basis: 140px; }
    .yt-stage { padding: 12px; }
}

/* ---------- Creator Kit: downloader + banner ---------- */
.td-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; margin-top: 15px; }
.td-card { background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.td-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.td-card-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.td-card-title { font-weight: 800; color: white; font-size: 0.95rem; }
.td-card.unavailable { opacity: 0.45; }

.bc-canvas { width: 100%; height: auto; display: block; background: #000; border-radius: 10px; border: 1px solid var(--border-color); }
.bc-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.bc-legend label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: #cbd5e1; cursor: pointer; white-space: nowrap; }
.bc-legend input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--accent-primary); }
.bc-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.bc-crop { width: 100%; display: block; border-radius: 8px; border: 1px solid var(--border-color); background: #000; }

/* ---------- Privacy Toolkit ---------- */
.pw-out {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.35rem;
    color: #a3e635;
    background: #020617;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    overflow-wrap: anywhere;
    line-height: 1.5;
    min-height: 1.5em;
}
.pw-alts { display: grid; gap: 8px; margin-top: 12px; }
.pw-alt {
    appearance: none;
    text-align: left;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    overflow-wrap: anywhere;
}
.pw-alt:hover { border-color: var(--accent-primary); color: white; }
.qr-preview { display: flex; justify-content: center; background: rgba(255, 255, 255, 0.03); border-radius: 12px; padding: 20px; }
.qr-preview canvas { width: 100%; max-width: 320px; height: auto; image-rendering: pixelated; border-radius: 6px; }
.tl-color { width: 100%; height: 42px; padding: 2px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-surface); cursor: pointer; box-sizing: border-box; }

/* ---------- Script formatter ---------- */
.sf-output { min-height: 320px; font-family: inherit; font-size: 1rem; line-height: 1.6; }

/* ---------- Teleprompter (fullscreen stage) ---------- */
.tp2-stage { position: fixed; inset: 0; z-index: 2147483000; background: #000; overflow: hidden; }
.tp2-stage[hidden] { display: none !important; }
.tp2-scroller { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.tp2-scroller::-webkit-scrollbar { display: none; }
.tp2-text {
    margin: 0 auto;
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-weight: 700;
    word-wrap: break-word;
}
.tp2-para { margin: 0 0 0.55em 0; padding: 0.05em 0.2em; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.tp2-para:hover { background: rgba(127, 127, 127, 0.15); }
.tp2-heading { opacity: 0.55; font-size: 0.6em; letter-spacing: 2px; text-transform: uppercase; margin-top: 1.2em; }
.tp2-end { opacity: 0.4; font-size: 0.5em; text-align: center; padding-top: 1em; }
.tp2-marker {
    position: absolute; left: 0; right: 0; top: 33%; height: 0; pointer-events: none;
    border-top: 2px solid rgba(249, 115, 22, 0.75);
}
.tp2-marker::before, .tp2-marker::after {
    content: ''; position: absolute; top: -9px; border: 8px solid transparent;
}
.tp2-marker::before { left: 6px; border-left-color: #f97316; }
.tp2-marker::after { right: 6px; border-right-color: #f97316; }
.tp2-progress { position: absolute; left: 0; top: 0; height: 3px; background: #f97316; width: 0; pointer-events: none; }
.tp2-count {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 25vh; font-weight: 800; color: #f97316; background: rgba(0, 0, 0, 0.6); pointer-events: none;
}
.tp2-count[hidden] { display: none; }
.tp2-bar {
    position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
    background: rgba(15, 23, 42, 0.92); border: 1px solid #334155; border-radius: 14px; padding: 10px 12px;
    transition: opacity 0.3s; max-width: calc(100vw - 24px); box-sizing: border-box;
}
.tp2-bar.tp2-hidden { opacity: 0; pointer-events: none; }
.tp2-bar .tl-btn { width: auto; }
.tp2-bar-speed { color: #cbd5e1; font-size: 0.85rem; font-weight: 700; min-width: 70px; text-align: center; }
.tp2-keys { font-size: 0.85rem; color: #cbd5e1; line-height: 1.8; }
.tp2-keys kbd {
    display: inline-block; min-width: 1.6em; text-align: center; padding: 1px 6px; margin-right: 4px;
    border: 1px solid #475569; border-bottom-width: 2px; border-radius: 5px; background: #0f172a; color: white;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem;
}

/* Long one-word tool names (e.g. "Teleprompter") must fit on small phones */
@media (max-width: 650px) {
    .hero h1 { font-size: 2.4rem !important; letter-spacing: -1px !important; overflow-wrap: break-word; }
}
