:root {
    --gate-bg: rgba(8, 10, 20, 0.82);
    --gate-card-bg: #ffffff;
    --gate-text: #1f2937;
    --gate-muted: #6b7280;
    --gate-primary: #2563eb;
    --gate-danger: #dc2626;
}

html.code-locked,
html.code-locked body {
    overflow: hidden;
}

html.code-locked body > :not(#code-gate) {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

#code-gate {
    position: fixed;
    inset: 0;
    background: var(--gate-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

#code-gate.hidden {
    display: none;
}

.gate-card {
    width: min(92vw, 380px);
    background: var(--gate-card-bg);
    color: var(--gate-text);
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.gate-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.gate-subtitle {
    font-size: 12px;
    color: var(--gate-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.gate-input {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0 12px;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    outline: none;
}

.gate-input:focus {
    border-color: var(--gate-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.gate-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

.gate-btn {
    flex: 1;
    height: 42px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.gate-btn.primary {
    background: var(--gate-primary);
    color: #ffffff;
}

.gate-btn.secondary {
    background: #eef2ff;
    color: #1e3a8a;
}

.gate-error {
    margin-top: 10px;
    font-size: 12px;
    color: var(--gate-danger);
    min-height: 16px;
}

.gate-footnote {
    margin-top: 12px;
    font-size: 11px;
    color: var(--gate-muted);
    line-height: 1.4;
}
