:root {
    color-scheme: dark;
    --bg: #0b0f14;
    --panel: #121923;
    --panel-soft: #0f151e;
    --border: #223042;
    --text: #e7edf5;
    --muted: #96a6b7;
    --accent: #6cc4ff;
    --accent-strong: #86d0ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 1.25rem;
    color: var(--text);
    font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
    background:
        radial-gradient(circle at 0% 0%, rgba(108, 196, 255, 0.12), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(90, 130, 190, 0.12), transparent 32%),
        var(--bg);
}

.app-shell {
    max-width: 980px;
    margin: 0 auto;
}

header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.brand {
    font-size: 1.65rem;
    font-weight: 600;
}

.muted {
    color: var(--muted);
}

.header-controls {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

#launchVsCodeBtn {
    min-width: 148px;
}

.launch-feedback {
    flex-basis: 100%;
    max-width: 420px;
    min-height: 42px;
}

.launch-feedback .muted {
    margin: 0.2rem 0 0;
    min-height: 1.1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 0.9rem;
}

.card {
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
}

h2 {
    margin: 0.45rem 0;
    font-size: 1.2rem;
}

button,
.button-link {
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 0.62rem 0.95rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.control-pill {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.4rem 0.55rem;
}

.control-pill select,
.control-pill input[type="number"] {
    border: 1px solid var(--border);
    background: #101722;
    color: var(--text);
    border-radius: 8px;
    padding: 0.35rem 0.45rem;
    font-family: inherit;
}

.control-pill input[type="number"] {
    width: 70px;
}

.control-pill .chevron {
    color: var(--muted);
    font-size: 0.8rem;
}

.control-pill select:focus,
.control-pill input[type="number"]:focus {
    outline: 2px solid rgba(108, 196, 255, 0.45);
    outline-offset: 1px;
}

.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #082235;
}

.primary:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

button:disabled {
    opacity: 0.55;
    cursor: progress;
}

ul.features {
    margin: 0.8rem 0 0;
    padding-left: 1.15rem;
    color: var(--muted);
}

ul.features li {
    margin-bottom: 0.45rem;
}

.chip {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.card-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.launch-progress {
    margin-top: 0.45rem;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.launch-progress__fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.2s ease;
}

.launch-progress.is-hidden {
    display: block;
    visibility: hidden;
}

.qr-card {
    display: flex;
    flex-direction: column;
}

.qr-card .chip {
    align-self: flex-start;
}

.qr-wrap {
    margin-top: 0.4rem;
    width: 100%;
    min-height: 220px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem;
}

.qr-image {
    width: min(100%, 210px);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    border-radius: 10px;
    background: #fff;
    padding: 0.45rem;
}
